Discussions related to Visual Prolog
Faddey
Posts: 14
Joined: 11 Mar 2018 16:09

Isn't this a mistake?

Unread post by Faddey »

Dear Thomas!
In the class core.cl ($(ProDir)pfc\) (Vip11) the following constants are declared:

Code: Select all

constants      oneMicrosecond = 10.                                       %,????  My comment      oneMillisecond = 1000 * oneMicrosecond.        %,????  My comment      oneSecond = 1000 * oneMillisecond.      oneMinute = 60 * oneSecond.      oneHour = 60 * oneMinute.      oneDay = 24 * oneHour.      oneWeek = daysInWeek * oneDay.      % @short One second/minute in the 100ns resolution used by gmtTimeValue, localTimeValue and durationValue      %@end.
It is known that one Millisecond is equal to 1000 Microseconds, but not 10,000.
Isn't this a mistake?
Best regards, Faddey.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1401
Joined: 28 Feb 2000 0:01

Re: Isn't this a mistake?

Unread post by Thomas Linder Puls »

No, this is as it should be (i.e. as intended).

The resolution of gmtTimeValue, localTimeValue and durationValue is 100ns (100 nano seconds).

Every "tick" is 100ns so 10 "ticks" is one microsecond.

This time representation is a basic representation in Windows and it is used in many places. The clock in you computer is given as a count of 100ns since midnight (early) 1. January 1601 (UTC), this is our gmtTimeValue. See File Times.
Regards Thomas Linder Puls
PDC
Faddey
Posts: 14
Joined: 11 Mar 2018 16:09

Re: Isn't this a mistake?

Unread post by Faddey »

Everything is clear Thomas!.
Thank you very much.
Faddey
Post Reply