help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inconsistent behavior of 'clock'


From: Mike Miller
Subject: Re: inconsistent behavior of 'clock'
Date: Sun, 21 Mar 1999 01:50:42 -0600 (CST)

Well, after spending a bunch of time on it, I found the old bug reports
and I see that it's fixed in newer versions of Octave.  I'm still using
the stable version.  Anyway, as everyone seems to know, the bug was in
localtime--it rounds off sec instead of using floor.

This leads to another issue.  Why recommend the combined use of etime and
clock when we can just use 'time' as follows:

t0=time; big_job; time-t0

instead of the more awkward and inefficient:

t0=clock; big_job; etime(clock,t0)

What do you think?  Don't they do the same thing in theory?  In practice,
both localtime and clock stand in the middle and can cause errors when
etime is used.  So 'time' alone is easier and more efficient.

Mike

-- 
Michael B. Miller
University of Missouri--Columbia
http://taxa.psyc.missouri.edu/~mbmiller/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]