lua-users home
lua-l archive

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


steve donovan wrote:
> On Fri, Nov 13, 2009 at 3:02 PM, Andreas Krinke <andreas.krinke@gmx.de> wrote:
>> os.clock() uses clock() from time.h which returns used processor time,
>> not time since Lua started.
> 
> D:\downloads>lua -e "print(os.clock())"
> 0
> 
> ?
> 

% cat test.lua
print(os.clock())
io.stdin:read()
print(os.clock())

% lua test.lua
0
Take your time to type a string
0

It's just using (nearly) no processor time.