mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-26 02:40:38 +01:00
Debug mode: more benchmark precision
This commit is contained in:
parent
11e19dd80a
commit
364534d154
@ -1461,7 +1461,7 @@ local function get_debug_grid(data, fs, full_height)
|
||||
end
|
||||
|
||||
local function make_fs(player, data)
|
||||
local start = debug_mode and os.clock() or nil
|
||||
local start = debug_mode and core.get_us_time() or nil
|
||||
|
||||
local fs = setmetatable({}, {
|
||||
__call = function(t, ...)
|
||||
@ -1502,7 +1502,7 @@ local function make_fs(player, data)
|
||||
|
||||
if debug_mode then
|
||||
get_debug_grid(data, fs, full_height)
|
||||
msg(data.player_name, fmt("make_fs(): %.2f ms", (os.clock() - start) * 1000))
|
||||
msg(data.player_name, fmt("make_fs(): %.2f ms", (core.get_us_time() - start) / 1000))
|
||||
msg(data.player_name, fmt("#fs elements: %u", #fs))
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user