Changeset 4:d061ad3be7fd in xplcommon for src/xplcommon/posix/Thread.h
- Timestamp:
- 12/27/12 18:52:39 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/Thread.h
r3 r4 33 33 34 34 #include <pthread.h> 35 #include <unistd.h> 35 36 36 37 //------------------------------------------------------------------------------ … … 45 46 class Thread 46 47 { 48 public: 49 /** 50 * Sleep for the given number of milliseconds. 51 */ 52 static void sleep(unsigned millis); 53 47 54 private: 48 55 /** … … 84 91 //------------------------------------------------------------------------------ 85 92 93 inline void Thread::sleep(unsigned millis) 94 { 95 usleep(static_cast<useconds_t>(millis)*1000); 96 } 97 98 //------------------------------------------------------------------------------ 99 86 100 inline Thread::~Thread() 87 101 {
Note:
See TracChangeset
for help on using the changeset viewer.