This has several flaws. First, the tick count is not milliseconds. Second, that count could roll in the middle of your execution, yeilding a negative run time. (this happens roughly once a month) Also, it's OS dependant.
I asked Sarcasmo what OS this was for, and the answer is Linux. | [reply] |
Yes, it *is* OS dependant, as I said on the first line of my reply. However you're wrong about the tick count, at least according to the Win32 manpage:
Win32::GetTickCount()
[CORE] Returns the number of milliseconds elapsed since the last
system boot. Resolution is limited to system timer ticks (about 10
+ms
on WinNT and 55ms on Win9X).
Its resolution is limited, however it is in miliseconds. | [reply] [d/l] |