Mistake on this page? Email us
Edge time API.

Files

file  edge_time.h
 Edge time API.
 

Functions

uint64_t edgetime_get_monotonic_in_ms ()
 Get current milliseconds. Uses CLOCK_MONOTONIC as source from POSIX.1-2001, POSIX.1-2008, SUSv2 compliant system. If _POSIX_MONOTONIC_CLOCK is not defined the function returns 0. More...
 
bool edgetime_get_real_in_ns (uint64_t *seconds, uint64_t *ns)
 Get the real time in seconds and nanoseconds. Uses CLOCK_REAL as source. More...
 

Detailed Description

Function Documentation

uint64_t edgetime_get_monotonic_in_ms ( )

Get current milliseconds. Uses CLOCK_MONOTONIC as source from POSIX.1-2001, POSIX.1-2008, SUSv2 compliant system. If _POSIX_MONOTONIC_CLOCK is not defined the function returns 0.

Returns
current milliseconds as uint64_t or 0 if clock source is not available.
bool edgetime_get_real_in_ns ( uint64_t *  seconds,
uint64_t *  ns 
)

Get the real time in seconds and nanoseconds. Uses CLOCK_REAL as source.

Returns
true if the system call succeeded. false if the system call failed and sets seconds and ns to 0.