poser
A C framework for POsix SERvices
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1#ifndef POSER_CORE_TIMER_H
2#define POSER_CORE_TIMER_H
3
4#include <poser/decl.h>
5
6#include <stddef.h>
7
15C_CLASS_DECL(PSC_Timer);
16
17C_CLASS_DECL(PSC_Event);
18
24DECLEXPORT PSC_Timer *
26 ATTR_RETNONNULL;
27
34DECLEXPORT PSC_Event *
36 CMETHOD ATTR_RETNONNULL ATTR_PURE;
37
46DECLEXPORT void
47PSC_Timer_setMs(PSC_Timer *self, unsigned ms)
48 CMETHOD;
49
58DECLEXPORT void
59PSC_Timer_start(PSC_Timer *self, int periodic)
60 CMETHOD;
61
68DECLEXPORT void
70 CMETHOD;
71
77DECLEXPORT void
79
80#endif
81
A simple event class.
A timer.
void PSC_Timer_stop(PSC_Timer *self)
Stop the timer.
PSC_Timer * PSC_Timer_create(void)
PSC_Timer default constructor.
void PSC_Timer_destroy(PSC_Timer *self)
PSC_Timer destructor.
void PSC_Timer_setMs(PSC_Timer *self, unsigned ms)
Set expiry in milliseconds.
void PSC_Timer_start(PSC_Timer *self, int periodic)
Start the timer.
PSC_Event * PSC_Timer_expired(PSC_Timer *self)
The timer expired.