System Calls


System.millis, millis

Since 0.8.0:

Returns the number of milliseconds passed since the device was last reset. This function is similar to the global millis() function but returns a 64-bit value.

While the 32-bit millis() rolls over to 0 after approximately 49 days, the 64-bit System.millis() does not.

One caveat is that sprintf-style formatting, including snprintf(),, Serial.printf(), String::format() etc. does not support 64-bit integers. It does not support %lld, %llu or Microsoft-style %I64d or %I64u.

As a workaround you can use the Print64 firmware library in the community libraries. The source and instructions can be found in Github.