shithub: purgatorio

ref: 8a788aea84aad3bfbd5b39d78c1925654f3b9e14
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;
};