LMMS
Loading...
Searching...
No Matches
water::Time Namespace Reference

Functions

int64 currentTimeMillis () noexcept
uint32 getMillisecondCounter () noexcept

Function Documentation

◆ currentTimeMillis()

int64 water::Time::currentTimeMillis ( )
noexcept

Returns the current system time.

Returns the number of milliseconds since midnight Jan 1st 1970 UTC.

Should be accurate to within a few millisecs, depending on platform, hardware, etc.

◆ getMillisecondCounter()

uint32 water::Time::getMillisecondCounter ( )
noexcept

Returns the number of millisecs since a fixed event (usually system startup).

This returns a monotonically increasing value which it unaffected by changes to the system clock. It should be accurate to within a few millisecs, depending on platform, hardware, etc.

Being a 32-bit return value, it will of course wrap back to 0 after 2^32 seconds of uptime, so be careful to take that into account. If you need a 64-bit time, you can use currentTimeMillis() instead.