Time Service
This module includes the platform abstraction for the time service.
Summary
Functions |
|
---|---|
otPlatTimeGet(void)
|
uint64_t
Get the current platform time in microseconds referenced to a continuous monotonic local clock (64 bits width).
|
otPlatTimeGetXtalAccuracy(void)
|
uint16_t
Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the local platform clock in units of PPM.
|
Functions
otPlatTimeGet
uint64_t otPlatTimeGet( void )
Get the current platform time in microseconds referenced to a continuous monotonic local clock (64 bits width).
The clock SHALL NOT wrap during the device's uptime. Implementations SHALL therefore identify and compensate for internal counter overflows. The clock does not have a defined epoch and it SHALL NOT introduce any continuous or discontinuous adjustments (e.g. leap seconds). Implementations SHALL compensate for any sleep times of the device.
Implementations MAY choose to discipline the platform clock and compensate for sleep times by any means (e.g. by combining a high precision/low power RTC with a high resolution counter) as long as the exposed combined clock provides continuous monotonic microsecond resolution ticks within the accuracy limits announced by otPlatTimeGetXtalAccuracy.
Details | |
---|---|
Returns |
The current time in microseconds.
|
otPlatTimeGetXtalAccuracy
uint16_t otPlatTimeGetXtalAccuracy( void )
Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the local platform clock in units of PPM.
In case the implementation does not estimate the current value but returns a fixed value, this value MUST be the worst-case accuracy over all possible foreseen operating conditions (temperature, pressure, etc) of the implementation.
Details | |
---|---|
Returns |
The current platform clock accuracy, in PPM.
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.