[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.clock() always return 0 on Archlinux (a Linode instance)
- From: Rob Kendrick <rjek@...>
- Date: Tue, 27 Sep 2011 20:21:28 +0100
On Tue, Sep 27, 2011 at 08:14:31PM +0100, David Given wrote:
> Just out of interest, has anyone used os.clock() for *anything*, ever?
> (Not counting Windows systems where it's equivalent to os.time().)
Yes: for measuring the performance of code without the effect of other
processes on the same machine. Given it measures CPU seconds, it's
ideal. Using wall-clock time for such measurements can result in skewed
results if suddenly updatedb runs, or a fat email arrives while you run
your test.
B.