TimerClock.h 603 B

1234567891011121314151617181920212223242526
  1. #ifndef INCLUDED_TIMER_CLOCK_H
  2. #define INCLUDED_TIMER_CLOCK_H
  3. #include <glib-object.h>
  4. G_BEGIN_DECLS
  5. #define TIMER_TYPE_CLOCK timer_clock_get_type()
  6. G_DECLARE_FINAL_TYPE(TimerClock, timer_clock, TIMER, CLOCK, GObject);
  7. typedef void(*TimerClockAction)(gpointer);
  8. /* All intervals are in miliseconds (unless otherwise stated) */
  9. TimerClock *timer_clock_new(int interval, TimerClockAction action, gpointer data);
  10. void timer_clock_start(TimerClock *self);
  11. void timer_clock_stop(TimerClock *self);
  12. gboolean timer_clock_is_running(TimerClock *self);
  13. G_END_DECLS
  14. #endif /* INCLUDED_TIMER_CLOCK_H */