Time
Ioto provides a suite of time management routines to help format, parse and manage time values.
Ioto stores calendar time in Time values that store the date/time as elapsed milliseconds since Jan 1, 1970. Time values may go backwards if the system date clock is adjusted.
Ioto stores system time in Ticks values that are a system representation of elapsed time in milliseconds. Ticks will never go backwards even if the system date clock is adjusted.
API Tour
To get the current time:
1 |
|
To get the current time in ticks:
1 |
|
To get a high resolution CPU tick counter on some systems:
1 |
|
To convert the time to a string local time representation:
1 |
|
To convert to universal time:
1 |
|
To get a local string representation of the current date:
1 |
|
To get an ISO format date:
1 |
|
To get the elapsed time since a prior measurement:
1 |
|
To get the remaining ticks until a timeout:
1 |
|
To parse an ISO date string:
1 |
|
API Reference
The full API is specified here: