Page MenuHomePhabricator (Chris)

timer.h
No OneTemporary

Authored By
Unknown
Size
502 B
Referenced Files
None
Subscribers
None
#ifndef _rtech1_util_timer_h
#define _rtech1_util_timer_h
#include "thread.h"
namespace Util{
/* calls a function after X seconds unless stop() is called first */
class Timer{
public:
typedef void (*timeout)(void * arg);
Timer(unsigned int seconds_to_wait, timeout func, void * arg);
void stop();
friend void * do_wait(void * timer_);
protected:
unsigned int wait;
timeout func;
void * arg;
bool stopped;
Thread::Lock lock;
Thread::Id timer;
};
}
#endif

File Metadata

Mime Type
text/x-c++
Expires
Sun, Nov 15, 1:31 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
128396
Default Alt Text
timer.h (502 B)

Event Timeline