PebbleOS
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
regular_timer.h File Reference
#include <pbl/util/list.h>

Data Structures

struct  RegularTimerInfo
 Regular timer registration, owned by the caller. More...
 

Typedefs

typedef void(* RegularTimerCallback) (void *data)
 Regular timer callback.
 

Functions

void regular_timer_init (void)
 Initialize the service and start the shared timer.
 
void regular_timer_add_seconds_callback (RegularTimerInfo *cb)
 Run a callback every second.
 
void regular_timer_add_multisecond_callback (RegularTimerInfo *cb, uint16_t seconds)
 Run a callback every seconds seconds.
 
void regular_timer_add_minutes_callback (RegularTimerInfo *cb)
 Run a callback every minute.
 
void regular_timer_add_multiminute_callback (RegularTimerInfo *cb, uint16_t minutes)
 Run a callback every minutes minutes.
 
bool regular_timer_remove_callback (RegularTimerInfo *cb)
 Unregister a seconds or minutes timer.
 
bool regular_timer_is_scheduled (RegularTimerInfo *cb)
 Check whether a timer is registered.
 
bool regular_timer_pending_deletion (RegularTimerInfo *cb)
 Check whether a timer is pending deletion.
 
void regular_timer_deinit (void)
 Stop the shared timer, for tests.
 
void regular_timer_fire_seconds (uint8_t secs)
 Fire the seconds timers whose period is a multiple of secs, for tests.
 
void regular_timer_fire_minutes (uint8_t mins)
 Fire the minutes timers whose period is a multiple of mins, for tests.
 
uint32_t regular_timer_seconds_count (void)
 Count the registered seconds timers, for tests.
 
uint32_t regular_timer_minutes_count (void)
 Count the registered minutes timers, for tests.