blob: e3ec1c6af7e61425d45a3d224f9e47c89e64cf27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*****************************************************************************
**
** Name: IntervalTimer.h
**
** Description: Asynchronous interval timer.
**
** Copyright (c) 2012, Broadcom Corp., All Rights Reserved.
** Proprietary and confidential.
**
*****************************************************************************/
#include <time.h>
class IntervalTimer
{
public:
typedef void (*TIMER_FUNC) (union sigval);
IntervalTimer();
~IntervalTimer();
bool set(int ms, TIMER_FUNC cb);
void kill();
bool create(TIMER_FUNC );
private:
timer_t mTimerId;
TIMER_FUNC mCb;
};
|