fix 'timeit' in headless mode
This commit is contained in:
@@ -34,11 +34,11 @@ end
|
||||
|
||||
|
||||
function timeit(iters, func, ...)
|
||||
local tm = time.uptime()
|
||||
local tm = os.clock()
|
||||
for i=1,iters do
|
||||
func(...)
|
||||
end
|
||||
print("[time mcs]", (time.uptime()-tm) * 1000000)
|
||||
print("[time mcs]", (os.clock()-tm) * 1000000)
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user