10-07-2016 04:48 AM
Hallo evrybody,
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.
wladimir
Solved! Go to Solution.
10-07-2016 10:49 AM
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.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646272(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx
10-10-2016 02:13 AM - edited 10-10-2016 02:14 AM
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.
10-10-2016 02:32 AM
I haven't tried it either, but it helps to read the documentation:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646302(v=vs.85).aspx
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.