www.beck-ipc.com

@CHIP-RTOS C Library - RTOS API


RTX_time

Get number of seconds elapsed since 00:00:00 January 1 1970

time_t RTX_time(time_t *ptr);

Parameters

ptr

Output parameter, pointer to time_t (see standard library) variable that will receive the timestamp

Return Value

Number of seconds elapsed since 00:00:00 January 1 1970

Comments

This function is faster than the standard library's time function and even the RTX_Get_TimeDate function, because it avoids several conversions of the timestamp.
This function requires around 30 microseconds execution time, assuming that no interrupts were serviced in the meantime.

This API may be called from within any form of Interrupt Service routine, although due to its rather long execution time this may not be a good idea.

Inside this API the interrupts are masked for short periods of time and then restored to the their masking state on entry.

See Also

RTOS API

This library function invokes a RTOS software interrupt to install a dynamic link into the RTOS. Refer to this RTOS API function's documentation for more details.

Related Topics

RTX API   Overview

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV2.02V2.02

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.80

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document