CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
host_api_time.cpp File Reference

Real implementations of the time-related host API functions. More...

#include "cdc_hal/IRtc.h"
#include "plugin_manager/host_api.h"
#include "esp_timer.h"
#include <ctime>

Go to the source code of this file.

Classes

class  IRtc

Functions

uint64_t host_uptime_ms (void)
 Monotonic milliseconds since boot.
int64_t host_unix_time (void)
 Current Unix timestamp in seconds, or 0 if RTC not set.
bool host_is_time_set (void)
 True when the RTC has been synchronised at least once.
int32_t host_timezone_offset (void)
 Configured timezone offset from UTC in seconds.
int host_local_time (struct host_tm *out)
 Fill out with the current local time broken into fields.
IRtcgetRtcInstance ()
 Returns the singleton RTC service instance.

Detailed Description

Real implementations of the time-related host API functions.

Definition in file host_api_time.cpp.

Function Documentation

◆ getRtcInstance()

Returns the singleton RTC service instance.

Returns
Pointer to the global IRtc implementation.

Definition at line 304 of file Rtc.cpp.

Referenced by host_is_time_set(), host_local_time(), host_timezone_offset(), and host_unix_time().