shithub: purgatorio

ref: 6b84c3a6548f1c577948763b0a09a7b6e2460e04
dir: purgatorio/module/timers.m

View raw version
Timers: module
{
	PATH: con "/dis/lib/timers.dis";

	Sec: con 1000;

	Timer: adt {
		dt:	int;
		timeout:	chan of int;

		start:	fn(msec: int): ref Timer;
		stop:	fn(t: self ref Timer);
	};

	init:	fn(gran: int): int;
	shutdown:	fn();
};