/*

clock.h - Progression of time

*/

#ifndef CLOCK_H
#define	CLOCK_H

typedef struct
	{
	FIBER fiber;
	unsigned ticks;
	} CLOCK;

extern void clock_init(void);

/* called from non-interrupt, usually a fiber */
extern void clock_schedule(CLOCK *clock, unsigned ticks, NF nf, void *nfp);

/* called from non-interrupt */
extern void clock_tick(void);

/* called from interrupt */
extern void clock_tick_isr(void);

#endif
