bin/ix-timestamp2 in ix-cli-0.0.16 vs bin/ix-timestamp2 in ix-cli-0.0.17

- old
+ new

@@ -17,20 +17,18 @@ start = timestamp prev = timestamp end object = { - :timestamp => timestamp.to_s.rjust(20, ' '), :time => Time.at(timestamp).to_s.rjust(20, ' '), - :elapsed => format('%1.5f', (timestamp - start)).to_s.rjust(10, ' '), - :diff => format('%2.5f', (timestamp - prev)).to_s.rjust(10, ' '), + :elapsed => format('%1.3f', (timestamp - start)).to_s.rjust(9, ' '), + :diff => format('%2.3f', (timestamp - prev)).to_s.rjust(9, ' '), :lineno => (('| ') + (lineno.to_s)).ljust(5, ' '), :message => json['message'] } if colors - object[:timestamp] = object[:timestamp].to_s.to_ansi.yellow.to_s object[:time] = object[:time].to_s.to_ansi.cyan.to_s object[:elapsed] = object[:elapsed].to_s.to_ansi.pink.to_s if (timestamp - prev) > 1 and (timestamp - prev) < 10 object[:diff] = object[:diff].to_s.to_ansi.green.to_s @@ -45,12 +43,12 @@ end object[:lineno] = object[:lineno].to_s.to_ansi.cyan.to_s end - puts format("%<timestamp>s %<time>s %<elapsed>s %<diff>s %<lineno>s %<message>s", object) + puts format("%<time>s %<elapsed>s %<diff>s %<lineno>s %<message>s", object) prev = timestamp rescue => e - puts e.message + # puts e.message end end