"H.J. Beestermoeller" wrote:
> I want to use the "GetSystemTime" / "GetLocalTime" function of the
> system DLL "kernel32.dll" (WINNT). One of these functions I need for
> getting a time information including milli-seconds.
> These functions are called with a parameter pointing to a structure
> "SYSTEMTIME".
I imagine Greg will pipe up if I'm wrong, but I'm pretty sure that the
Get Date/Time in Seconds primitive in LabVIEW calls the very DLL to
which you refer under Win32. There have been discussions on
Info-LabVIEW about this, and I'll try to paraphrase what I recall:
The Get Date/Time in Seconds primitive will give you an absolute time
with subsecond accuracy down to 55 ms under Win32. You can't really do
better than that under Win32 when it comes to absolute time.
What you
can do is access the OS timer (accurate to 1 ms) by using the Tick Count
(ms) primitive, but that rolls over every 49.7 days and thus is more
useful for determining accurate differences over relatively short
periods of time (say, benchmarking LabVIEW code).
If you want to try to combine the two primitives to come up with a
pseudo-absolute timestamp accurate to 1 ms, you're welcome to try, but
you'd probably be better off simply using Get Date/Time in Seconds and
living with the 55 ms accuracy.
There's a good example of a timestamp w/ milliseconds on the NI site:
http://digital.ni.com/explprog.nsf/websearch/96a848dea235e3bd8625671e0026e479
Regards,
John Lum
National Instruments