Header for thread control class (variation on tasks)
More...
#include <chrono>
Go to the source code of this file.
|
namespace | vex |
| Bumper switch device class
|
|
Header for thread control class (variation on tasks)
Definition in file vex_thread.h.
◆ get_id()
int32_t vex::this_thread::get_id |
( |
| ) |
|
Gets the ID of the thread.
- Returns
- Returns an integer that represents the thread's ID.
◆ priority()
int32_t vex::this_thread::priority |
( |
| ) |
|
Gets the priority of the current thread.
- Returns
- Returns the priority of the current thread as an integer.
◆ setPriority()
void vex::this_thread::setPriority |
( |
int32_t | priority | ) |
|
Sets the priority of the current thread.
- Parameters
-
priority | The priority of the thread to be set to. |
◆ sleep_for() [1/2]
template<typename _Rep , typename _Period >
void vex::this_thread::sleep_for |
( |
const std::chrono::duration< _Rep, _Period > & | __rtime | ) |
|
|
inline |
Suspends the current thread until the time is expired in milliseconds.
- Parameters
-
rtime | The standard chrono::duration object representing the time to sleep. |
Definition at line 143 of file vex_thread.h.
◆ sleep_for() [2/2]
void vex::this_thread::sleep_for |
( |
uint32_t | time | ) |
|
sleep_for
Suspends the current thread until the time is expired in milliseconds.
- Parameters
-
time | The amount of time for the thread to sleep. |
◆ sleep_until() [1/2]
template<typename _Clock , typename _Duration >
void vex::this_thread::sleep_until |
( |
const std::chrono::time_point< _Clock, _Duration > & | __atime | ) |
|
|
inline |
Sleeps until the system timer reaches the time specified in the parameter.
- Parameters
-
atime | The standard chrono::time_point object representing the time to sleep. |
Definition at line 163 of file vex_thread.h.
◆ sleep_until() [2/2]
void vex::this_thread::sleep_until |
( |
uint32_t | time | ) |
|
sleep_until
Sleeps until the system timer reaches the time specified in the parameter.
- Parameters
-
time | The amount of time for the thread to sleep. |