µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.
this_thread Namespace Reference

A namespace for functions applying to the current thread. More...

Functions

thread::id get_id () noexcept
 Return the id of the current running thread. More...
 
template<typename Clock_T = os::estd::chrono::systick_clock, typename Rep_T , typename Period_T >
constexpr void sleep_for (const std::chrono::duration< Rep_T, Period_T > &rel_time)
 Sleep for a given duration. More...
 
template<typename Clock_T , typename Duration_T >
void sleep_until (const std::chrono::time_point< Clock_T, Duration_T > &abs_time)
 Sleep until a given time point. More...
 
template<typename Duration_T >
void sleep_until (const std::chrono::time_point< os::estd::chrono::realtime_clock, Duration_T > &abs_time)
 
template<typename Duration_T >
void sleep_until (const std::chrono::time_point< os::estd::chrono::systick_clock, Duration_T > &abs_time)
 
void yield () noexcept
 Yield the CPU to the next ready thread. More...
 

Detailed Description

A namespace for functions applying to the current thread.

Function Documentation

◆ get_id()

thread::id this_thread::get_id ( )
inlinenoexcept

Return the id of the current running thread.

Definition at line 402 of file thread_internal.h.

◆ sleep_for()

template<typename Clock_T = os::estd::chrono::systick_clock, typename Rep_T , typename Period_T >
constexpr void this_thread::sleep_for ( const std::chrono::duration< Rep_T, Period_T > &  rel_time)

Sleep for a given duration.

Parameters
[in]rel_time

extra Clock_T is an extension to the standard

Definition at line 457 of file thread_internal.h.

◆ sleep_until() [1/3]

template<typename Clock_T , typename Duration_T >
void this_thread::sleep_until ( const std::chrono::time_point< Clock_T, Duration_T > &  abs_time)

Sleep until a given time point.

Parameters
[in]abs_time

Definition at line 477 of file thread_internal.h.

◆ sleep_until() [2/3]

template<typename Duration_T >
void this_thread::sleep_until ( const std::chrono::time_point< os::estd::chrono::realtime_clock, Duration_T > &  abs_time)

Definition at line 498 of file thread_internal.h.

◆ sleep_until() [3/3]

template<typename Duration_T >
void this_thread::sleep_until ( const std::chrono::time_point< os::estd::chrono::systick_clock, Duration_T > &  abs_time)

Definition at line 522 of file thread_internal.h.

◆ yield()

void this_thread::yield ( void  )
inlinenoexcept

Yield the CPU to the next ready thread.

Definition at line 396 of file thread_internal.h.