VEX V5 C++ API
Functions
vex::this_thread Namespace Reference

Functions

int32_t get_id ()
 Gets the ID of the thread. More...
 
void yield ()
 Suspends the current thread. More...
 
void sleep_for (uint32_t time_ms)
 sleep_for More...
 
void sleep_until (uint32_t time)
 sleep_until More...
 
void setPriority (int32_t priority)
 Sets the priority of the current thread. More...
 
int32_t priority ()
 Gets the priority of the current thread. More...
 

Function Documentation

◆ 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.

◆ yield()

void vex::this_thread::yield ( )

Suspends the current thread.

◆ sleep_for()

void vex::this_thread::sleep_for ( uint32_t  time_ms)

sleep_for

Suspends the current thread until the time is expired in milliseconds.

Parameters
time_msThe amount of time for the thread to sleep.

◆ sleep_until()

void vex::this_thread::sleep_until ( uint32_t  time)

sleep_until

Sleeps until the system timer reaches the time specified in the parameter.

Parameters
timeThe amount of time for the thread to sleep.

◆ setPriority()

void vex::this_thread::setPriority ( int32_t  priority)

Sets the priority of the current thread.

Parameters
priorityThe priority of the thread to be set to.

◆ 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.