Hi
I need to add sleep function in some procedure, I found some sleep function
function sleep(mTime)
{
var sleeping = true;
var now = new Date();
var alarm;
var startingMSeconds = now.getTime();
while(sleeping){
alarm = new Date();
alarmMSeconds = alarm.getTime();
if(alarmMSeconds - startingMSeconds > mTime)
sleeping = false;
}
}
but it causes program to hang, any better sleep function ?
P.S: I cant use setTimeout function either
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners