Cosmetic improvements

This commit is contained in:
osmarks 2018-07-27 11:57:28 +01:00
parent 164577ce15
commit 49a1a8d2f3
2 changed files with 6 additions and 2 deletions

View File

@ -46,7 +46,7 @@ local function update_index_for(name)
index[name] = data
print("Indexed", name)
print("Indexed", name, ".")
end
-- Reindex all connected inventories

View File

@ -82,6 +82,10 @@ local function init_screen(scr, bg, fg)
scr.clear()
end
local function round_to_tenth(t)
return math.round(t*10)*0.1
end
-- Runs a Wyvern node server.
-- First argument is a function to be run for requests. It will be provided the request data and must return the value to respond with.
-- If it errors, an internal error will be returned.
@ -124,7 +128,7 @@ local function serve(fn, node_type)
else
local end_time = os.clock()
print("Response:", textutils.serialise(result))
print("Time:", tostring(end_time - start_time))
print("Time:", tostring(round_to_tenth(end_time - start_time)))
response = { type = "response", response = result }
end
else