Mbed OS Reference
Loading...
Searching...
No Matches
LowPowerClock Class Reference

A C++11 Clock representing the HAL lp_ticker. More...

#include <LowPowerClock.h>

Static Public Member Functions

static time_point now ()
 Read the current time. More...
 
static void lock ()
 Lock the clock to ensure it stays running; dummy for API compatibility with HighResClock. More...
 
static void unlock ()
 Unlock the clock, allowing it to stop during power saving; dummy for API compatibility with HighResClock. More...
 

Detailed Description

A C++11 Clock representing the HAL lp_ticker.

Dummy lock/unlock methods are provided to have the same generic API as UnlockedHighPowerClock. No action is required as the lp_ticker runs continuously.

Definition at line 38 of file LowPowerClock.h.

Member Function Documentation

◆ now()

static time_point now ( )
static

Read the current time.

Definition at line 48 of file LowPowerClock.h.

◆ lock()

static void lock ( )
static

Lock the clock to ensure it stays running; dummy for API compatibility with HighResClock.

Definition at line 54 of file LowPowerClock.h.

◆ unlock()

static void unlock ( )
static

Unlock the clock, allowing it to stop during power saving; dummy for API compatibility with HighResClock.

Definition at line 59 of file LowPowerClock.h.