28#include "rtos/mbed_rtos_types.h"
29#include "platform/mbed_toolchain.h"
30#if !MBED_CONF_RTOS_PRESENT
31#include "platform/internal/mbed_os_timer.h"
50uint64_t get_tick_count();
64MBED_DEPRECATED_SINCE(
"mbed-os-6.0.0",
"Use `Kernel::Clock::now()` to get a chrono time_point instead of an integer millisecond count.")
76 using duration = std::chrono::milliseconds;
77 using rep = duration::rep;
78 using period = duration::period;
79#if MBED_CONF_RTOS_PRESENT
80 using time_point = std::chrono::time_point<Clock>;
85 using time_point = std::chrono::time_point<mbed::internal::OsClock, duration>;
87 static constexpr bool is_steady =
true;
88 static time_point now()
90 return time_point(duration(impl::get_tick_count()));
95 using duration_u32 = std::chrono::duration<uint32_t, period>;
constexpr Clock::duration_u32 wait_for_u32_forever
Magic "wait forever" constant for Kernel::Clock::duration_u32-based APIs.
uint64_t get_ms_count()
Read the current RTOS kernel millisecond tick count.
void attach_idle_hook(void(*fptr)(void))
Attach a function to be called by the RTOS idle task.
void attach_thread_terminate_hook(void(*fptr)(osThreadId_t id))
Attach a function to be called when a thread terminates.
constexpr Clock::duration_u32 wait_for_u32_max
Maximum duration for Kernel::Clock::duration_u32-based APIs.
A C++11 chrono TrivialClock for the kernel millisecond tick count.
static void unlock()
Unlock the clock, allowing it to stop during power saving; dummy for API compatibility with HighResCl...
static void lock()
Lock the clock to ensure it stays running; dummy for API compatibility with HighResClock.