gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Fwd: Re: value of maxSecondParts in SysClock.def


From: john o goyo
Subject: [Gm2] Fwd: Re: value of maxSecondParts in SysClock.def
Date: Sat, 13 Feb 2016 14:59:43 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15

Meant to send this to the list.

Apologies,
john

-------- Original Message --------
Subject: Re:  value of maxSecondParts in SysClock.def
Date: Fri, 12 Feb 2016 16:12:47 -0500
From: john o goyo <address@hidden>
To: Gaius Mulley <address@hidden>

On 09/02/2016 05:38, Gaius Mulley wrote:
"Riedl, Udo-Michael"<address@hidden>  writes:

Hallo,

just noticed a small hurdle. In SysClock.def I find "CONST
maxSecondParts = 1000000;"
Value should be 100 on an Intel CPU based system, that's at least what
the following tells me

#include<stdio.h>
#include<unistd.h>
void main()
{
       long int ClkTck;
       ClkTck = sysconf(_SC_CLK_TCK);
       printf("\n\n %s %12ld\n\n","CLK_TCK = ",ClkTck);
}

The value is by sure OS / machine depended - maybe needs to be set different
on different platform a compile time.

Cheers
Michael

Hi Michael,

interesting, I guess we cannot change the ISO definition module
constant.  However inside SysClock.mod via wraptime.c it should deliver
the fractional time in microseconds.  Is this not the case?  If not then
this is a bug and could/will be fixed by scaling the clock tick
appropriately.

Whence your value of maxSecondParts, Gaius?  ISO/IEC 10514-1:1996 Para.
9.6.1 specifies it as implementation-defined.

If this is mapped to the POSIX CLOCKS_PER_SEC, then the value is correct
(vide http://pubs.opengroup.org/onlinepubs/9699919799/ :"The value of
CLOCKS_PER_SEC shall be 1 million on XSI-conformant systems.").

Incidentally, Michael's value also comes out on my PPC- and Sparc-based
systems.

john

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]