Lua: timing
This commit is contained in:
@@ -6,6 +6,8 @@ local Map = { }
|
||||
-- TODO: refactor
|
||||
Map.merge = Util.merge
|
||||
Map.shallowCopy = Util.shallowCopy
|
||||
Map.find = Util.find
|
||||
Map.filter = Util.filter
|
||||
|
||||
function Map.removeMatches(t, values)
|
||||
local function matchAll(entry)
|
||||
|
||||
@@ -77,6 +77,9 @@ function Util.tostring(pattern, ...)
|
||||
end
|
||||
|
||||
if type(pattern) == 'string' then
|
||||
if select('#', ...) == 0 then
|
||||
return pattern
|
||||
end
|
||||
return _sformat(pattern, ...)
|
||||
elseif type(pattern) == 'table' then
|
||||
return serialize(pattern, term.current().getSize())
|
||||
|
||||
Reference in New Issue
Block a user