lua-users home
lua-l archive

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

Cheng, Long wrote:
The POSIX standard specifies os.clock() returning CPU time used. But microsoft POSIX library os.clock() returns wall time elapsed since the process started. You'd better avoid using it when your lua code is supposed to run both on Windows and Linux. We learned this a hard way.

Thanks! Now at last I understand why I didn't understand :-) I always used os.clock() as wall-clock time (on Windows) and was quite suprised at discovering it was intended to measure CPU time.

What about the Mac? CPU time, I suppose, being Unix-based?