🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.transputer
Article #330

timer

#330
From: Ahmed.I.Mahdaly
Date: Sun, 15 Oct 1989 21:24
29 lines
1249 bytes
DEAR NETER,
   I have many questions about the following program:

        TIMER clock :
        INT now, end, comp.time, i :
        SEQ
          i := 0
          WHILE  i > 10
            SEQ
              clock ? now
              ... process
              clock ? end
              -- each tick takes 64 usec

              comp.time := ((end - now) * 64))
              i := i + 1


  1- I THE TIME OF THE PROCESS LESS THAN ONE TICK, THE comp.time WILL BE ZERO.
     HOW TO MEASURE THE ACCURATE TIME OF THAT PROCESS ?

  2- THE TIMER GIVES INTEGER VALUES, IF THE PROCESS TAKE FOR EX. A TIME BETWEEN
     2 AND 3 (LET SAY 2.6) TICKS, HOW TO KNOW THE ACCURATE TIME ?

  3- WHY DO I GET DIFFERENT TIME FOR THAT PROCESS IN EACH TIME THE WHILE LOOP
     EXECUTED?

         THANKS FOR ANY HELPFUL.
                                 A. MAHDALY
Technical Details
Message-ID: <793*Ahmed.I.Mahdaly@QueensU.CA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!QueensU.CA!Ahmed.I.Mahdaly

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!QueensU.CA!Ahmed.I.Mahdaly
From: Ahmed.I.Mahdaly@QueensU.CA
Newsgroups: comp.sys.transputer
Subject: timer
Message-ID: <793*Ahmed.I.Mahdaly@QueensU.CA>
Date: 15 Oct 89 21:24:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 29