ScottD edited this page Jan 11, 2017 · 2 revisions

The Timerclass constructs an objects that allows you to create a delay between other Jewelbot functions or keep track of time since the program started running.

COMPONENT INTIALIZATION

Timer timer;
//naming the variable type and then the name of variable.

PARAMETERS

Property Type Value/Description
uint32_t number Time is milliseconds. It is the time for how long you wish to delay for.

API

  • .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();
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.