oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
ove::steady_clock Struct Reference

Steady-clock wrapping the substrate's monotonic time source. More...

#include <types.hpp>

Public Types

using duration = std::chrono::nanoseconds
 
using rep = duration::rep
 
using period = duration::period
 
using time_point = std::chrono::time_point< steady_clock >
 

Static Public Member Functions

static time_point now () noexcept
 

Static Public Attributes

static constexpr bool is_steady = true
 

Detailed Description

Steady-clock wrapping the substrate's monotonic time source.

Satisfies the C++ TrivialClock requirements so it can be used with std::chrono arithmetic. The epoch matches whatever ove_time_now_steady_ns reports — opaque, monotonic, ns-resolved.

Use with the binding's _until variants:

auto deadline = ove::steady_clock::now() + 100ms;
if (mtx.try_lock_until(deadline).has_value()) {
// …critical section…
mtx.unlock();
}

The documentation for this struct was generated from the following file: