Here you go:
Code:
#include <acknex.h>

void on_mouse_left_event()
{
	static fixed t0 = -16;
	static fixed t1 = -16;
	if (total_ticks <= t0 + 16)
	{
		beep(); // Do whatever you want to do here instead.
		t0 = t1 = -16;
	} else {
		t0 = t1;
		t1 = total_ticks;
	}
}


Last edited by Uhrwerk; 12/06/12 04:01. Reason: Fixed a bug in the code

Always learn from history, to be sure you make the same mistakes again...