mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fix 'timeit' in headless mode
This commit is contained in:
parent
c67f158e62
commit
b05c2fc911
4 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
----------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue