Add start/stop methods
This commit is contained in:
@ -17,8 +17,6 @@ namespace sc {
|
||||
mutable void* _context {};
|
||||
timer_t _tid;
|
||||
|
||||
static void callback(union sigval);
|
||||
|
||||
public:
|
||||
timer(double time,
|
||||
bool repeat,
|
||||
@ -34,6 +32,15 @@ namespace sc {
|
||||
bool is_armed() const;
|
||||
void time_left(struct itimerspec& cur_value) const;
|
||||
double time_left() const;
|
||||
|
||||
void stop();
|
||||
void start();
|
||||
void start(double time, bool repeat);
|
||||
|
||||
private:
|
||||
static void callback(union sigval);
|
||||
|
||||
void setup_timer(double time, bool repeat);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user