lua-users home
lua-l archive

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

On Tue, Sep 27, 2011 at 5:55 PM, Johnson Lin <> 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 - formats [the current] time
os.time - the current time ... or a time representing the date and
time specified by the given table