Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F627053
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
502 B
Referenced Files
None
Subscribers
None
timer.h
View Options
#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
Details
Attached
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)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline