Преглед на файлове

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]
     }
 }