Jump to content

quirk, cross platform timers lag


Recommended Posts

I just ran into this oddity, which might lead me to revise a little a logger of mine. Now, I know of two easy ways of getting a number of seconds from LV:

 

post-28229-0-37389900-1436890344.png

 

The doc is not too eloquent about the high resolution one and its cross-platform implementation, it only says "with 14 digits of precision after the decimal separator". Which would imply, if the representation is double, a span of only something like 100 sec, and this seems not the case (something like 14 significant figures and us resolution instead might be it).

 

What is a quirk is that, if I convert the numbers in linux I get exactly the same time of the day, just a difference of 66 years and a day, not under windows, at the very least on just two machines I have tried. Hence under linux I could use the high precision timer to provide an useful 24h clock too, under windows not. The doc warns that the former is "relative" and "short time", true.

 

post-28229-0-95816900-1436890068.png post-28229-0-75795100-1436890080.png

 

I think I remember some discussion about, haven't searched yet. I think I was sort of aware that the two OSs use a different time structure for storing the system clock, which is probably exploited differently.

 

ETA: yeah, https://lavag.org/topic/16198-timestamp-behavior/#entry98843 and http://www.ni.com/tutorial/7900/en/ , but they don't explain the 24107 days difference.

 

ETA2: uhm, 1/1/1970 - 1/1/1904 = 24107 days...

Edited by ensegre
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.