Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Precision in DateTime Arithmetic
Message
From
01/12/2012 06:30:17
 
 
To
01/12/2012 04:51:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01558431
Message ID:
01558531
Views:
50
>>run this some time ... and you get a random time glitch
>>
>>CLEAR
>>FOR k=1 TO 1000000
>>	IF INT(SECONDS())#DATETIME()-DTOT(DATE()) && This should always be true
>>		? SECONDS(),DATETIME(),DATETIME()-DTOT(DATE())
>>	ENDIF
>>NEXT
>>
>
>Ran it ten times, found none. Maybe I finally have a machine that's fast enough?
>
>Tried this too:
>
STORE datetime() to x,y
>x = x + 0.323
>?x=y
>
>
>It seems the datetime values don't hold milliseconds anymore.

I increased the number of tests to 100 millions, and I got 27 errors. In other words the error is 0.27ppm (part per million) which I can live with.
Previous
Reply
Map
View

Click here to load this message in the networking platform