shithub: purgatorio

ref: 15e065df12bf7ad79000d150cefa5038ee7416b3
dir: /appl/demo/lego/timers.m/

View raw version
Timers : module{
	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;
};