浏览代码

doofy doof does thingy with wrong types duh

Phil 2 年之前
父节点
当前提交
08840e4e1b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/tron.rb

+ 2 - 2
lib/tron.rb

@@ -47,8 +47,8 @@ def parse(message)
     end
   when "tick"
     puts "#{Time.now.strftime('%M%S%L')}: #{message}"
-    puts "tick took: #{Time.now.strftime('%M%S%L') - $lasttick}"
-    $lasttick = Time.now.strftime('%M%S%L')
+    puts "tick took: #{Time.now.strftime('%M%S%L').to_i - $lasttick}"
+    $lasttick = Time.now.strftime('%M%S%L').to_i
     decide()
   when "die"
     puts "#{Time.now.strftime('%M%S%L')}: #{message}"