µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::estd::chrono::systick_clock Class Reference

#include <chrono>

Public Types

using duration = std::chrono::duration< rep, period >
 basic duration type of clock
 
using period = std::ratio< 1, os::rtos::clock_systick::frequency_hz >
 
using rep = rtos::clock_systick::timestamp_t
 type of variable holding the tick counter
 
using sleep_duration = std::chrono::duration< sleep_rep, period >
 
using sleep_rep = rtos::clock_systick::duration_t
 
using time_point = std::chrono::time_point< systick_clock >
 basic time_point type of clock
 

Static Public Member Functions

static time_point now () noexcept
 
static void sleep_for (sleep_rep ticks)
 

Static Public Attributes

static constexpr bool has_sleep_for { true }
 
static constexpr bool is_steady { true }
 

Detailed Description

Definition at line 66 of file chrono.

Member Typedef Documentation

◆ duration

using os::estd::chrono::systick_clock::duration = std::chrono::duration<rep, period>

Definition at line 76 of file chrono.

◆ period

std::ratio type representing the tick period of the clock, in seconds

Definition at line 74 of file chrono.

◆ rep

◆ sleep_duration

Definition at line 77 of file chrono.

◆ sleep_rep

◆ time_point

Definition at line 79 of file chrono.

Member Function Documentation

◆ now()

systick_clock::time_point os::estd::chrono::systick_clock::now ( )
staticnoexcept
Returns
time_point representing the current value of the clock

Definition at line 48 of file chrono.cpp.

49 {
50 const auto ticks = rtos::sysclock.now ();
51 return time_point{ duration{ ticks } };
52 }
std::chrono::time_point< systick_clock > time_point
basic time_point type of clock
Definition chrono:79
std::chrono::duration< rep, period > duration
basic duration type of clock
Definition chrono:76
virtual timestamp_t now(void)
Tell the current time, possibly adjusted for epoch.
clock_systick sysclock
The system clock object instance.

References os::rtos::clock::now(), and os::rtos::sysclock.

Referenced by os::estd::condition_variable_any::wait_for(), os::estd::condition_variable_any::wait_for(), os::estd::condition_variable::wait_for(), and os::estd::condition_variable::wait_for().

◆ sleep_for()

void os::estd::chrono::systick_clock::sleep_for ( sleep_rep  ticks)
inlinestatic

Definition at line 233 of file chrono.

234 {
236 }
result_t sleep_for(duration_t duration)
Sleep for a relative duration.

Member Data Documentation

◆ has_sleep_for

constexpr bool os::estd::chrono::systick_clock::has_sleep_for { true }
staticconstexpr

Definition at line 81 of file chrono.

◆ is_steady

constexpr bool os::estd::chrono::systick_clock::is_steady { true }
staticconstexpr

Definition at line 80 of file chrono.


The documentation for this class was generated from the following files: