[mercury-users] SEC: UNCLASSIFIED:-
Ralph Becket
rafe at cs.mu.OZ.AU
Wed Oct 30 09:45:23 AEDT 2002
Ian.Sykes at defence.gov.au, Wednesday, 30 October 2002:
>
> My questions:
> Does time__clocks_per_sec return a meaningful value?
Yes - it is the number of units per second that time is measured in on
a given platform by the time API.
> How is it fixed/determined?
By the OS. The module time.m includes the C file <time.h> which in
turn includes <bits/time.h> (on Debian, at any rate) which defines
CLOCKS_PER_SEC as 1000000l (on my machine, at any rate.)
> What is its relationship to ElapsedRealTime given that, in my case,
> it is a multiple?
It's simple: time__clock(ElapsedClockTicks, IO0, IO1) will unify
ElapsedClockTicks with the number of clock ticks that have gone by since
the start of the process (or some other, arbitrary, point before that.)
(ElapsedClockTicks / clocks_per_sec) is therefore the number of whole
seconds that have elapsed since the start of the process.
If you want the number of centiseconds since this point, just use
(ElapsedClockTicks / (clocks_per_sec / 100)).
- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list