[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: clock() function note ...
- From: "Luiz Carlos Silveira" <luiz@...>
- Date: Mon, 10 Jun 2002 09:48:31 -0300
The Lua clock() function measures the CPU time given to the process, so if your program occupies 1% of the CPU on the average,
clock() will measure 1/100 of the real elapsed time. If your process occupies 100% of the CPU (almost impossible with
multiprogramming operating systems) you would get the results you expected.
How to get the real time in Lua? I don't know...
if you just want a precision around seconds, you can use date()
From: firstname.lastname@example.org [mailto:email@example.com]On Behalf Of Alex Bilyk
Sent: Saturday, June 08, 2002 5:33 AM
To: Multiple recipients of list
Subject: clock() function note ...
I have been doing some perfomance tests for LUA-based code and fould that standard LUA *clock()* function yields just about exactly
half the time it is supposed to. I have AMD 1.3G system running Win2K. Granted, I measured it against the standard Win2K clock
application (it would count one day for two, and it does not, if it were at fault). Has anyubody experienced this problem?