LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the Get Date/Time In Seconds vi give the time when the system clock finished the last second, or does it just have one-sec resolution?

I am needing an accurate assesment of the computer's clock.
0 Kudos
Message 1 of 8
(3,229 Views)
The function will return a value with a 1 ms resolution. The true resolution and accuracy of it is another question though. Try calling it twice with a wait in between that you vary and you'll get an idea...

Check out the following thread:

http://messages.info-labview.org/2003/01/28/04.html
0 Kudos
Message 2 of 8
(3,229 Views)
If the function returns only integer seconds, and you say that this is to within 1 ms of some system clock, does this mean that the function comes back within 1ms of the report second finishing on the system clock?
0 Kudos
Message 3 of 8
(3,229 Views)
The resolution depends on your operating system. However, I think all OSes have a resolution at least as good as 1 ms in LV 7.

Are you sure that the display is showing fractional seconds, and they are 0?
0 Kudos
Message 4 of 8
(3,229 Views)
The Get Date/Time vi description indicates that it returns integer seconds. It indicates nothing about reporting fractional parts of a second.
0 Kudos
Message 5 of 8
(3,229 Views)
It does not return an integer, it returns a 128 bit timestamp in LV7, in LV6 it returns a double precision floating point number. But all this is obvious, what is it you want to use the timestamp for and why does the accuracy and resolution matter. Knowing that we can tell whether there's a problem.
0 Kudos
Message 6 of 8
(3,229 Views)
I have it now! Sorry to trouble. When the context help indicated that Get Date/Time returns the number of complete seconds, I assumed that it returned an integer. FORTRAN habits show up in the ugliest places. I now see that it returns info as you indicate. Thank you.
0 Kudos
Message 7 of 8
(3,229 Views)
The "complete seconds" should really read "seconds". I'll work on reporting that issue.
0 Kudos
Message 8 of 8
(3,229 Views)