[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: Peter Cawley <lua@...>
- Date: Tue, 27 Sep 2011 18:01:55 +0100
On Tue, Sep 27, 2011 at 5:55 PM, Johnson Lin <arch.jslin@gmail.com> wrote:
> And to my surprise, the tick returned by os.clock() is moving
> extremely slow, and if I make a burst of thousands of calls to
> os.clock(), it'll move a little bit faster (like 0.01 -> 0.02 -> 0.03
> every few "REAL" seconds), otherwise it'll simply return 0, as if
> the difference in time is not reportable by the function.
>
> What might be causing this? I am really confused. :(
os.clock - an approximation of the amount in seconds of CPU time used
by the program
os.date - formats [the current] time
os.time - the current time ... or a time representing the date and
time specified by the given table