Add running time and event value support (#874)

This commit is contained in:
Sam El-Husseini 2018-06-18 11:42:35 -07:00 committed by GitHub
parent 4e423472c2
commit ce6959377a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,15 +66,13 @@ namespace pxsim.control {
board().bus.queue(id, evid)
}
// TODO: (microbit master)
// export function eventTimestamp() {
// return board().bus.getLastEventTime()
// }
export function eventTimestamp() {
return board().bus.getLastEventTime()
}
// TODO: (microbit master)
// export function eventValue() {
// return board().bus.getLastEventValue()
// }
export function eventValue() {
return board().bus.getLastEventValue()
}
}
namespace pxsim.pxtcore {
@ -88,10 +86,9 @@ namespace pxsim.input {
return runtime.runningTime();
}
// TODO: (microbit master)
// export function runningTimeMicros(): number {
// return runtime.runningTimeUs();
// }
export function runningTimeMicros(): number {
return runtime.runningTimeUs();
}
export function calibrateCompass() {
// device calibrates...