From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b3c24209310418d0 X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,b3c24209310418d0 X-Google-Attributes: gidfee84,public X-Google-Thread: 103376,b3c24209310418d0 X-Google-Attributes: gid103376,public From: jzamora@avellano.datsi.fi.upm.es (Juan Zamorano Flores) Subject: Re: Timing Ada programs using the DEC UNIX microtimer kernel option Date: 1998/04/27 Message-ID: <6i27ap$m85$1@panoramix.fi.upm.es>#1/1 X-Deja-AN: 348114001 Distribution: world References: <6hsab5$rh1$1@eplet.mira.net.au> Organization: Departamento de Arquitectura. Facultad de Informatica. Universidad Politecnica de Madrid. Newsgroups: comp.unix.osf.osf1,comp.sys.dec,comp.lang.ada Date: 1998-04-27T00:00:00+00:00 List-Id: In article <6hsab5$rh1$1@eplet.mira.net.au>, dccoote@werple.mira.net.au (David Coote) writes: |> |> "As for micro-timer resolution - the clock resolution remains the same - |> 1/1024; however, any call to clock_gettime(3) is guaranteed to be |> monotonically increasing with a granularity of 1 microsecond. (i.e. the clock |> is still ticking at 1/1024, but clock_gettime(3) calls return values that are |> unique and APPEAR [DEC's emphasis] to have 1 microsecond resolution. This is |> useful for critical timestamping.)" |> |> Well, how do they do this monotonic increase? If the appropriate parts of the |> kernel are getting tickled every 1024Hz, how is the kernel returning finer |> resolution between ticks? |> |> Anyone know anything about this? |> |> David |> The hardware timer interrupts at 1024Hz. So the kernel has a time granularity of 1/1024Hz. The clock_gettime call could use the hardware timer downcount register to improve the resolution. I don't know DEC UNIX but in DOS the hardware timer interrupts at 18.2 Hz. But you can have microseconds resolution if you read the hardware timer downcount register. Juan