I tried this and got pretty constant results except for maybe the first ten iterations. I figured if you just jump in with the milliseconds you would not be at the "beginning" of the milliseconds and added a repeat loop to mitigate that effect. Furthermore I appended the result to a variable.
------------------------------------------- local last_known_millisecond local queries = 0 local report local longSecs, tMs on mouseUp lock screen put empty into report --let it start at a flip of the ms repeat put the milliseconds into tMs if char -1 of tMs is 0 then exit repeat end if end repeat repeat 1000 times put 0 into queries put the long seconds into longSecs put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries && (the long seconds - longSecs) * 1000 & cr after report end repeat unlock screen put report end mouseUp -------------------------- _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode