Added description to timers

This commit is contained in:
Peli de Halleux 2018-01-15 03:41:14 -08:00
parent cb5f9648f5
commit e1f623a94d
2 changed files with 8 additions and 4 deletions

View File

@ -52,11 +52,12 @@
"console.logValue|param|value": "to write", "console.logValue|param|value": "to write",
"console.sendToScreen": "Sends the log messages to the brick screen and uses the brick up and down buttons to scroll.", "console.sendToScreen": "Sends the log messages to the brick screen and uses the brick up and down buttons to scroll.",
"control": "Program controls and events.", "control": "Program controls and events.",
"control.Timer.millis": "Gets the elapsed time in millis", "control.Timer": "A timer",
"control.Timer.millis": "Gets the elapsed time in millis since the last reset",
"control.Timer.pauseUntil": "Pauses until the timer reaches the given amount of milliseconds", "control.Timer.pauseUntil": "Pauses until the timer reaches the given amount of milliseconds",
"control.Timer.pauseUntil|param|ms": "how long to pause for, eg: 5, 100, 200, 500, 1000, 2000", "control.Timer.pauseUntil|param|ms": "how long to pause for, eg: 5, 100, 200, 500, 1000, 2000",
"control.Timer.reset": "Resets the timer", "control.Timer.reset": "Resets the timer",
"control.Timer.seconds": "Gets the elapsed time in seconds", "control.Timer.seconds": "Gets the elapsed time in seconds since the last reset",
"control.allocateNotifyEvent": "Allocates the next user notification event", "control.allocateNotifyEvent": "Allocates the next user notification event",
"control.deviceFirmwareVersion": "Determine the version of system software currently running.", "control.deviceFirmwareVersion": "Determine the version of system software currently running.",
"control.dmesg": "Write data to DMESG debugging buffer.", "control.dmesg": "Write data to DMESG debugging buffer.",

View File

@ -1,4 +1,7 @@
namespace control { namespace control {
/**
* A timer
*/
//% fixedInstances //% fixedInstances
export class Timer { export class Timer {
start: number; start: number;
@ -8,7 +11,7 @@ namespace control {
} }
/** /**
* Gets the elapsed time in millis * Gets the elapsed time in millis since the last reset
*/ */
//% blockId=timerMillis block="%timer|millis" //% blockId=timerMillis block="%timer|millis"
millis(): number { millis(): number {
@ -16,7 +19,7 @@ namespace control {
} }
/** /**
* Gets the elapsed time in seconds * Gets the elapsed time in seconds since the last reset
*/ */
//% blockId=timerSeconds block="%timer|seconds" //% blockId=timerSeconds block="%timer|seconds"
seconds(): number { seconds(): number {