summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-24 11:12:05 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-24 11:12:05 +0200
commit9f51fcad223572c459e7fc0705dfba44da38aaad (patch)
tree35dd9798d445f3c9b9a67542a1ed70d754564393 /thread.h
parent70e60380562fb25a7acce9b47c75842d60722dd0 (diff)
downloadvdr-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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/thread.h b/thread.h
index da49bcdd..2cc623bf 100644
--- a/thread.h
+++ b/thread.h
@@ -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.