barrier/mt/CTimerThread.h

29 lines
540 B
C
Raw Normal View History

2001-10-06 18:13:28 +04:00
#ifndef CTIMERTHREAD_H
#define CTIMERTHREAD_H
class CThread;
class CTimerThread {
2002-04-29 18:40:01 +04:00
public:
// cancels the calling thread after timeout seconds unless destroyed
// before then. if timeout is less than zero then it never times
// out and is a no-op.
2001-10-06 18:13:28 +04:00
CTimerThread(double timeout);
~CTimerThread();
2002-04-29 18:40:01 +04:00
private:
2001-10-06 18:13:28 +04:00
void timer(void*);
// not implemented
CTimerThread(const CTimerThread&);
CTimerThread& operator=(const CTimerThread&);
2002-04-29 18:40:01 +04:00
private:
2001-10-06 18:13:28 +04:00
double m_timeout;
CThread* m_callingThread;
CThread* m_timingThread;
};
#endif