!?
It was tested a bit.
Code:
var tm_n1 = 0;
var tm_n2 = 0;
var tm_n3 = 0;
function tmf_secNext() {
	tm_n3 += 1;
	//spof_n1("tm_n3: ", tm_n3);
	//spof_n1("sys_seconds: ", sys_seconds);
}
function tmf_count() {
	while(1) {
		tm_n2 = total_ticks / 16;
		if ((tm_n2 - tm_n1) > 1) {
			tm_n1 = tm_n2;
			tmf_secNext();
		}
		wait(1);
	}
}