瀏覽代碼

standardize timing to second instead of millisecond

Gary Paduana 9 年之前
父節點
當前提交
9b50358e40
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/groovy/com/garypaduana/groovytools/system/Timing.groovy

+ 1 - 1
src/main/groovy/com/garypaduana/groovytools/system/Timing.groovy

@@ -19,7 +19,7 @@ class Timing{
     static def timeIt = { closure ->
         def start = System.nanoTime()
         def result = closure()
-        def duration = (System.nanoTime() - start) / 1e6
+        def duration = (System.nanoTime() - start) / 1e9
         return [returnValue: result, duration: duration]
     }
 }