IoTivity-Lite
|
#include "oc_clock_util.h"
#include "oc_export.h"
#include "util/oc_compiler.h"
#include <stdbool.h>
#include <stdint.h>
Functions | |
void | oc_clock_init (void) |
A second, measured in system clock time. More... | |
unsigned long | oc_clock_seconds (void) |
Get the current value of the platform seconds. More... | |
uint64_t | oc_clock_seconds_v1 (void) |
Get the current value of the platform seconds. More... | |
oc_clock_time_t | oc_clock_time (void) |
Get the current clock time. More... | |
bool | oc_clock_time_has_monotonic_clock (void) |
Check if the platform supports a monotonic clock. More... | |
oc_clock_time_t | oc_clock_time_monotonic (void) |
Get the current monotonic clock time. More... | |
void | oc_clock_wait (oc_clock_time_t t) |
Wait for a given number of ticks. More... | |
void oc_clock_init | ( | void | ) |
A second, measured in system clock time.
Initialize the clock library.
This function initializes the clock library and should be called from the main() function of the system.
unsigned long oc_clock_seconds | ( | void | ) |
Get the current value of the platform seconds.
uint64_t oc_clock_seconds_v1 | ( | void | ) |
Get the current value of the platform seconds.
This could be the number of seconds since startup, or since a standard epoch.
oc_clock_time_t oc_clock_time | ( | void | ) |
Get the current clock time.
This function returns the current system clock time.
bool oc_clock_time_has_monotonic_clock | ( | void | ) |
Check if the platform supports a monotonic clock.
oc_clock_time_t oc_clock_time_monotonic | ( | void | ) |
Get the current monotonic clock time.
This could be the number of seconds since startup, or since a standard epoch. This time is guaranteed to be monotonic, and not effected by any changes in system.
void oc_clock_wait | ( | oc_clock_time_t | t | ) |
Wait for a given number of ticks.
t | How many ticks. |