Page MenuHomePhabricator (Chris)

timer.h
No OneTemporary

Authored By
Unknown
Size
506 B
Referenced Files
None
Subscribers
None
#ifndef _paintown_util_timer_h
#define _paintown_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
Sat, Nov 14, 8:08 PM (23 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
113629
Default Alt Text
timer.h (506 B)

Event Timeline