wlib-timer

1.0.0 • Public • Published

wlib-timer

System-independent basic timer library. Defines a timer type that is used to get time since a base point.

Usage

static wlp::timer timer;

void setup() {
    wlp::timer::begin();
    timer.zero(); // base point
}

void loop() {
    timer.us() // microseconds
    timer.ms() // milliseconds
    timer.sec() // seconds (float)
}

Caveats

On AVR systems sizeof(time_t) => 4 which means that the max time value is about 71 hours. The function begin must be called on some platforms.

Readme

Keywords

Package Sidebar

Install

npm i wlib-timer

Weekly Downloads

1

Version

1.0.0

License

none

Unpacked Size

3.8 kB

Total Files

15

Last publish

Collaborators

  • mogball