03-14-2011 03:22 PM
I believe the tick count starts when the PC first powers up.
It doesn't matter when it actually rolls over, if you do the subtraction, the way the math works out with the unsigned integers is that it still works out. Now if the tick count rolled over twice (>49 days up to ~99 days depending on how close the original tick count was to rolling over) between tick counts, then you could have an error of 49 days.
03-14-2011 03:58 PM
ah huh! Yes, very nice. It doesn't much matter when the tick count starts as long as your elapsed time is less than ~49 days. Thansk Ravens Fan
04-21-2016 04:06 PM - edited 04-21-2016 04:08 PM
I know I'm late to the party but my preference is to use the ms tick count. The reason being that if you use "get seconds" and if the time is adjusted on your computer (Window Time Sync for example), you could end up with a negative elapsed time.
04-21-2016 05:25 PM - edited 04-21-2016 11:06 PM
@AbandoningCausality wrote:I know I'm late to the party but my preference is to use the ms tick count. The reason being that if you use "get seconds" and if the time is adjusted on your computer (Window Time Sync for example), you could end up with a negative elapsed time.
There is now also a third option: "High Resolution Relative Seconds". It works similar in many ways like tick count(ms), but is directly in seconds and with much higher resolution. That's what I typically use. If you use SI units to display the elapsed time, it also looks great (I use e.g. "%.2ps" as format).
04-22-2016 02:28 AM
If rollover/exceeding 49 days of elapsed time is an issue, and you still want to use the millisecond timer. You could always integrate/sum the intervals between calls?
04-26-2016 12:26 PM
That only works if you can gaurantee you'll call the integrating function more than once every 49 days.