Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F622385
timer.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
506 B
Referenced Files
None
Subscribers
None
timer.h
View Options
#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
Details
Attached
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)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline