oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
time.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
14#pragma once
15
16#include <ove/time.h>
17#include <ove/types.hpp>
18
19#ifdef CONFIG_OVE_TIME
20
21namespace ove {
22
29namespace time {
30
36[[nodiscard]] inline int get_us(uint64_t *out) {
37 return ove_time_get_us(out);
38}
39
44inline void delay_ms(uint32_t ms) {
45 ove_time_delay_ms(ms);
46}
47
52inline void delay_us(uint32_t us) {
53 ove_time_delay_us(us);
54}
55
56} /* namespace time */
57
58} /* namespace ove */
59
60#endif /* CONFIG_OVE_TIME */
void delay_us(uint32_t us)
Blocks the calling task for at least the specified number of microseconds.
Definition time.hpp:52
void delay_ms(uint32_t ms)
Blocks the calling task for at least the specified number of milliseconds.
Definition time.hpp:44
int get_us(uint64_t *out)
Returns the current system time in microseconds.
Definition time.hpp:36
Top-level namespace for all oveRTOS C++ abstractions.
Definition app.hpp:19
Common type definitions and concepts for the C++ wrapper layer.