You copied the Doc URL to your clipboard.

Clocks [ALPHA]

The C++ Thread Porting API provides clock functions in the <arm-tpl.h> header file.

Note

This topic describes an [ALPHA] feature. See Support level definitions.

Types

struct timespec {
    time_t tv_sec;
    unsigned long tv_nsec;
};

Functions

int __ARM_TPL_clock_realtime(timespec* ts); 
int __ARM_TPL_clock_monotonic(timespec* ts); 

Usage

The function __ARM_TPL_clock_realtime() must populate the ts argument with the current system-wide (wall-clock) time.

The function __ARM_TPL_clock_monotonic() must populate the ts argument with the elapsed time since some fixed point in time.

Note

Time measurements produced by __ARM_TPL_clock_monotonic() must be steady, in that, those measurements must increase at a fixed rate relative to the real time.

Returns

These functions must return zero if successful, or return non-zero if not successful to indicate an error.

Was this page helpful? Yes No