diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-10-24 11:12:05 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-10-24 11:12:05 +0200 |
commit | 9f51fcad223572c459e7fc0705dfba44da38aaad (patch) | |
tree | 35dd9798d445f3c9b9a67542a1ed70d754564393 /thread.h | |
parent | 70e60380562fb25a7acce9b47c75842d60722dd0 (diff) | |
download | vdr-9f51fcad223572c459e7fc0705dfba44da38aaad.tar.gz vdr-9f51fcad223572c459e7fc0705dfba44da38aaad.tar.bz2 |
Added cCondWait::Sleep() and using it to replace all usleep() calls
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.h 1.23 2004/10/24 10:28:48 kls Exp $ + * $Id: thread.h 1.24 2004/10/24 11:00:32 kls Exp $ */ #ifndef __THREAD_H @@ -22,6 +22,10 @@ private: public: cCondWait(void); ~cCondWait(); + static void SleepMs(int TimeoutMs); + ///< Creates a cCondWait object and uses it to sleep for TimeoutMs + ///< milliseconds, immediately giving up the calling thread's time + ///< slice and thus avoiding a "busy wait". bool Wait(int TimeoutMs = 0); ///< Waits at most TimeoutMs milliseconds for a call to Signal(), or ///< forever if TimeoutMs is 0. |