Mail Archives: djgpp/2001/08/01/05:00:21
Gwen <mb11363 AT chello DOT be> wrote:
> yes difftime() is what I needed, but it's in second too.
But it's a floating point result. So an implementation could return a
difftime() result of 0.035 seconds, if it wants to. Of course, most
won't, but the standard allows for it nevertheless.
> Doing arithmetic with the clock_t type is certainly not very elegant, but
> it works in my case ( there isn't a function like diffclock() ).
You don't need a special diffclock() function because unlike time_t,
clock_t has its values made interpretable by the CLOCKS_PER_SEC
constant. I.e. you can easily implement your own diffclock(), if you
want one, but you could never implement difftime() portably, given the
amount of information the standards allows you to access about time_t.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -