Photon microGUI widgets library 0.6.0
stdex::this_thread Namespace Reference

Functions

thread::id get_id () throw ()
 Return the thread ID of the calling thread.
 
template<class _Rep , class _Period >
void sleep_for (const chrono::duration< _Rep, _Period > &_dur)
 

Detailed Description

The namespace this_thread provides methods for dealing with the calling thread.

Function Documentation

◆ sleep_for()

template<class _Rep , class _Period >
void stdex::this_thread::sleep_for ( const chrono::duration< _Rep, _Period > &  _dur)
inline

Blocks the calling thread for a period of time.

Parameters
[in]aTimeMinimum time to put the thread to sleep. Example usage:
// Sleep for 100 milliseconds
this_thread::sleep_for(chrono::milliseconds(100));
void sleep_for(const chrono::duration< _Rep, _Period > &_dur)
Definition: thread.hpp:2022
Note
Supported duration types are: nanoseconds, microseconds, milliseconds, seconds, minutes and hours.