
src/pmc/alarm.pmc - Alarm

.include 'alarm.pasm'
new P0, 'Alarm'
set P0[.PARROT_ALARM_TIME], N_time # A FLOATVAL
set P0[.PARROT_ALARM_SUB], P_sub # set handler sub PMC
invoke P0 # schedule the alarm

Sometime after N_time, P_sub will be called exactly once.
void init()Initializes the alarm.
PMC *clone()Create a copy of the alarm.
PMC *get_pmc_keyed_int(INTVAL key)Returns the PMC associated with key.
FLOATVAL get_number_keyed_int(INTVAL key)Returns the number associated with key.
FLOATVAL get_number()Having the alarm numify to the time is convienient for sorting.
void set_pmc_keyed_int(INTVAL key, PMC *value)Sets the PMC associated with key to *value.
opcode_t *invoke(void *next)Schedules the alarm and adds it to the alarm queue.
void set_number_keyed_int(INTVAL key, FLOATVAL value)Sets the floating-point value associated with key to value.