-
Notifications
You must be signed in to change notification settings - Fork 19
Timer
ScottD edited this page Jan 11, 2017
·
2 revisions
The Timer
class constructs an objects that allows you to create a delay between other Jewelbot functions or keep track of time since the program started running.
Timer timer;
//naming the variable type and then the name of variable.
Property | Type | Value/Description |
---|---|---|
uint32_t | number | Time is milliseconds. It is the time for how long you wish to delay for. |
-
.pause(uint32_t milliseconds) This function pauses your Jewelbot.
Timer timer; timer.pause(1000); //this pauses your Jewelbot for 1 second.
-
.runtime_ms() This function returns the number of milliseconds since the program finished starting up the hardware. The return value is of type uint32_t.
Timer timer; uint32_t how_long = timer.runtime_ms();