how can Tick Cout return a lesser value than GetLastInputInfo in the attached vi? When i run that vi, i get sometimes an arithmetic overflow when i substract LastInputInfo Time Value from Tick Counter.
I use LabView Base 2015 SP1 (15.0.1f1 32 Bit) On W7 64 bit Proffesional SP1.
Solved! Go to Solution.
I ran it for about 30 seconds off and on and wasn't able to replicate it. Only reason I can think is if there is an error in the time on the GetLastInputInfo. Check the two links below which talk about the resolution of that function.
I think both Tck Count and LasInputInfo return ms since start of the OS from the same source. So the resolution should not be an issue.
I haven't tried it either, but it helps to read the documentation:
While it doesn't give too many details it does say that it doesn't have to be incremental, so you could get older data (which is not what you're seeing) or you could get data coming from another source (for instance, if someone called SendInput). I have no idea which tick count SendInput uses, but that could certainly provide one scenario which explains what you're seeing.
In general, I would say that if you want to compare times, you should make sure you have a canonical time source.