Uptime#

The Uptime Interface module provides interfaces for tracking and managing system uptime within the Sidewalk SDK. These interfaces ensure consistent and platform-independent access to uptime information, allowing developers to monitor the duration for which the system has been running since the last reset or power cycle.

Functions#

sid_error_t
sid_pal_uptime_now(struct sid_timespec *time)

Get the current time of specified clock source.

void

Set crystal offset for RTC compensation.

int16_t

Get current crystal offset.

Function Documentation#

sid_pal_uptime_now#

sid_error_t sid_pal_uptime_now (struct sid_timespec * time)

Get the current time of specified clock source.

Parameters
TypeDirectionArgument NameDescription
struct sid_timespec *[out]time

current time

NOTE: drift may be NULL. In this case time should be set and drift ignored. Success should be returned.


sid_pal_uptime_set_xtal_ppm#

void sid_pal_uptime_set_xtal_ppm (int16_t ppm)

Set crystal offset for RTC compensation.

Parameters
TypeDirectionArgument NameDescription
int16_t[in]ppm

offset in PPM


sid_pal_uptime_get_xtal_ppm#

int16_t sid_pal_uptime_get_xtal_ppm (void )

Get current crystal offset.

Parameters
TypeDirectionArgument NameDescription
voidN/A