WPC# <#uRN}M-U48p$Rt<nܻasn꽧ObnYOl_5hG/wX!fuب;(\uWT) &mPBlosbSq5`E2n F:-bivcS\EW^ļh.o #`A/sHD}w&_"k#njTNT_V<'Bdu0#r3lj\Ty(#CraigT.Dedo ` SYSTEM_CLOCKFixup=(#April22,1997  (#Page  1  ڀof2(D$XXXX}}}    (2VV$ D!XX      d:\office\wpwin\template\x3j3-rpt.wpt<6X9`(CourierXx6X@KX@<6X9`(Courierd6X@K@+`4New Century Schoolbooke P'CP 0 X Example. Assumethattheprocessorclockisa24hourclockthatregisterstimeat  1,193,180/65,536orapproximately18.20648193tickspersecond.At11:30A.M.thereference XX  X   CALLSYSTEM_CLOCK(COUNT=C,COUNT_RATE=R,COUNT_MAX=M)0 X assignsC=(11*3600+30*60)*18.20648193=753748;R=18.20648193; XX  X andM=24*3600*18.206481931=1573039  VV'    ݛ ,Xhh>(#  J3/97-160r1 # è#Ԉ X ТNCITSJ3ANSIFortranStandardsCommittee>(#CraigT.Dedo ` SYSTEM_CLOCKFixup?(#May15,1997  (#Page  1  ڀof2gQZ8NewCenturySchlbk RegularSYSTEM_CLOCK FixupReport,' ' $X3J3/97-160r1$Craig T. Dedo$Craig T. Dedo .   /4 Fortran 2000 Standard+None     "1 302Original   ,X.< ,C:\X3J3\141\97-160.wpd<C:\X3J3\141\97-160.wpd/  (3b$ D!XX      # e37=CIQYag1.a.i.(1)(a)(i)1)a)Level 1Level 2Level 3Level 4Level 5gQZ8NewCenturySchlbk RegularH IeDHD"d8dT8\2p`4New Century Schoolbook3|x' e37=CIQYag1.a.i.(1)(a)(i)1)a)2p`4New Century Schoolbook+`4New Century Schoolbook9LXp>New Century Schoolbook Bold 0 X Example. Assumethattheprocessorclockisa24hourclockthatregisterstimeat  1,193,180/65,536orapproximately18.20648193tickspersecond.At11:30A.M.thereference XX  X   CALLSYSTEM_CLOCK(COUNT=C,COUNT_RATE=R,COUNT_MAX=M)0 X definesC=(11*3600+30*60)*18.20648193=753748;R=18.20648193; XX  X andM=24*3600*18.206481931=1573039(3b$ D!XX      ݂Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5 Okidata OL840 PostScriptdd0U(3b$ D!XX       ,,,,'dxd dP Pd<)>+qC <<CLevel 1Level 2Level 3Level 4Level 5($$   1  11' dxdd D!XX      ݛC  e'#C  ֣r^4` <hDp Lx !(#T$%&Xr  @ ! SYSTEM_CLOCKFixup j  @ZZ"byCraigT.Dedo@$May15,1997April22,1997 1.  Rationale  u    Currently,theFortranstandardrequiresthatallthreeargumentstotheSYSTEM_CLOCKintrinsicsubroutinebeoftypedefaultINTEGER.WhiletheINTEGERdatatypeisacceptableforCOUNTandCOUNT_MAX,itcausesseriousaccuracyproblemsfortheCOUNT_RATEargument.Thisshortcomingunnecessarilyrestrictstheavailableprecision.  Theprocessorclocksofmanymachines,mostnotablytheclocksofIntel80x86PCs,havesignificantfractionalcomponentsintheirclockrates.OnIntel(MS-DOSPC)machines,theclockticksapproximately18.20648193(1,193,180/65,536)timespersecond(NortonandWilton1988,143145)(Norton,Aitken,andWilton1993,174-178).RequiringCOUNT_RATEtobeINTEGERcausesconsiderablelossofaccuracyforsuchmachines.  Interpretation132attemptedtoresolvethisproblembutitdoesnotresolvethecentraldeficiency.IntheIntelcase,theinterpretationallowedallthreeofthesepractices:  2 e  1  .3  0  IncrementCOUNTby1every0.05495secondsbutreturnaCOUNT_RATEof18.I(#(#   2 e  2  .3  0  IncrementCOUNTby10every0.05495secondsandreturnaCOUNT_RATEof182.n(#(#   2 e  3  .3  0  IncrementCOUNTbyavariableamountevery0.05495secondsandreturnaCOUNT_RATE ) of100. (#(#   Allthreeofthesepracticesare,atbest,counterintuitiveandnotthebehavioranordinaryprogrammerwouldexpect.MostprogrammersexpectCOUNT_RATEtobeaverycloseapproximationtotheactualsystemclockcountrate.  OneofthemostattractivefeaturesofFortranisthatitisgenerallyintuitiveandstraightforward.Therearerelativelyfewtrapsand"gotchas"whichcauseproblemsforprogrammerswhohavelessthanexpertlevelofability.X3J3shouldeliminatesuchproblemswheneverpossible. 2.  TechnicalDescription  2    ThisproposalextendsthefunctionalityoftheSYSTEM_CLOCKsubroutinesothatitcanacceptnondefaultkindsofintegersinallthreeargumentsandcanacceptagenericrealargumentforCOUNT_RATE. 3.  EditstotheStandardbeOperatedonLater  ".&   TheseeditsarewithrespecttotheFortran95CommitteeDraft,X3J3/96-007r1.[270:2144]Replacesection13.14.106withthefollowing: 13.14.106 4 SYSTEM_CLOCK([COUNT][,COUNT_RATE][,COUNT_MAX])  C&+   Description.  Returnsnumericdatafromarealtimeclock. ' ,   Class.  4 Subroutine 'W!- &    Arguments.  (".   COUNT(optional)0 shallbescalarandoftypeinteger.ItisanINTENT(OUT)argument.Itis )#0 assigneda'(processordependentvaluebasedonthecurrentvalueoftheprocessorclock,ortoorHUGE(COUNT)ifthereisnoclock.TheprocessordependentvalueisincrementedbyoneforeachclockcountuntilthevalueCOUNT_MAXisreachedandisresettozeroatthenextcount.Itliesintherange0toCOUNT_MAXifthereisaclock.  (# (#  \.'6   COUNT_RATE(optional)     4  `  0 shallbescalarandoftypeintegerorreal.ItisanINTENT(OUT)argument.Itisassignedaprocessordependentapproximationtothenumberofprocessorclockcountspersecond,orzeroifthereisnoclock.  (# (#   COUNT_MAX(optional)     4  `  0 shallbescalarandoftypeinteger.ItisanINTENT(OUT)argument.ItisassignedthemaximumvaluethatCOUNTcanhave,orzeroifthereisnoclock.  (# (# |9!+qB2.| 0  `Exx0vvdds ||9!+qB2.| 0  `Exx0vvdds | (#(#             (#(# 4.  References   ISO/IEC1539-1:1991(E)InternationalStandardProgrammingLanguageFortran90,13.13.104. G 0   Norton,PeterandRichardWilton.1988.TheNewPeterNorton'sProgrammer'sGuidetotheIBMPC + andPS/2.Redmond,WA:MicrosoftPress.(#(# 0   Norton,Peter,PeterAitken,andRichardWilton.1993.ThePeterNortonPCProgrammer'sBible. d Redmond,WA:MicrosoftPress. (#(# X3J3/94-160,ResultsofCorrigendum2BallotX3J3/95-004r1,X3J3JournalofRequirements(JOR),Item066X3J3/96-006,Interpretation000132%  [Endof97-160]