Various fixes (#548)
* adding running time micros * support for system micro seconds * restore display mode after plotting sprites * bump pxt
This commit is contained in:
@ -339,13 +339,23 @@ namespace input {
|
||||
/**
|
||||
* Gets the number of milliseconds elapsed since power on.
|
||||
*/
|
||||
//% help=input/running-time weight=50
|
||||
//% help=input/running-time weight=50 blockGap=8
|
||||
//% blockId=device_get_running_time block="running time (ms)"
|
||||
//% advanced=true
|
||||
int runningTime() {
|
||||
return system_timer_current_time();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the number of microseconds elapsed since power on.
|
||||
*/
|
||||
//% help=input/running-time-micros weight=49
|
||||
//% blockId=device_get_running_time_micros block="running time (micros)"
|
||||
//% advanced=true
|
||||
int runningTimeMicros() {
|
||||
return system_timer_current_time_us();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obsolete, compass calibration is automatic.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user