From d883bf1db32745ecb97caf350069920e2390a747 Mon Sep 17 00:00:00 2001 From: Caitlin Hennessy Date: Tue, 1 Aug 2017 09:58:16 -0700 Subject: [PATCH] Add eventTimestamp and eventValue to pxsim.control --- sim/state/misc.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sim/state/misc.ts b/sim/state/misc.ts index 19804c42..1212fbf1 100644 --- a/sim/state/misc.ts +++ b/sim/state/misc.ts @@ -65,6 +65,14 @@ namespace pxsim.control { // TODO mode? board().bus.queue(id, evid) } + + export function eventTimestamp() { + return board().bus.getLastEventTime() + } + + export function eventValue() { + return board().bus.getLastEvent() + } } namespace pxsim.pxtcore {