17#ifndef MBED_HIGHRESCLOCK_H
18#define MBED_HIGHRESCLOCK_H
21#include "hal/us_ticker_api.h"
22#include "platform/mbed_power_mgmt.h"
52 using duration = std::chrono::microseconds;
53 using rep = duration::rep;
54 using period = duration::period;
55 using time_point = std::chrono::time_point<HighResClock>;
56 static const bool is_steady =
false;
59 static time_point
now()
67 sleep_manager_lock_deep_sleep();
73 sleep_manager_unlock_deep_sleep();
A C++11 Clock representing the HAL us_ticker.
static void unlock()
Unlock the clock, allowing it to stop during power saving.
static time_point now()
Read the current time.
static void lock()
Lock the clock to ensure it stays running.
us_timestamp_t ticker_read_us(const ticker_data_t *const ticker)
Read the current (absolute) ticker's timestamp.
const ticker_data_t * get_us_ticker_data(void)
Get ticker's data.