Cosmetic improvements
This commit is contained in:
parent
164577ce15
commit
49a1a8d2f3
@ -46,7 +46,7 @@ local function update_index_for(name)
|
||||
|
||||
index[name] = data
|
||||
|
||||
print("Indexed", name)
|
||||
print("Indexed", name, ".")
|
||||
end
|
||||
|
||||
-- Reindex all connected inventories
|
||||
|
6
lib.lua
6
lib.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user