Checking appendGcode time in lua

This commit is contained in:
peteruithoven 2013-10-29 11:11:11 +01:00
parent 84260a7493
commit c0c85bab44
1 changed files with 4 additions and 0 deletions

View File

@ -228,7 +228,11 @@ function M.print_POST(request, response)
local rv,msg
-- TODO: return errors with a separate argument like here in the rest of the code (this is how we designed the API right?)
local startTime = os.clock()
rv,msg = printer:appendGcode(argGcode)
local duration = os.clock()-startTime
log:debug(" duration: "..utils.dump(duration))
if rv then
--NOTE: this does not report the number of lines, but only the block which has just been added
response:addData('gcode_append',argGcode:len())