shithub: purgatorio

ref: 482e874528c6c86e661a3e4a1b9fda12f2346385
dir: /appl/cmd/lego/timers.m/

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

	Timer : adt {
		id : int;
		tick : chan of int;

		reset : fn (t : self ref Timer);
		cancel : fn (t : self ref Timer);
		destroy : fn (t : self ref Timer);
	};

	init : fn (res : int);
	new : fn(ms, rep : int) : ref Timer;
};