Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Precision in DateTime Arithmetic
Message
De
01/12/2012 06:30:17
 
 
À
01/12/2012 04:51:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01558431
Message ID:
01558531
Vues:
49
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform