Quellcode durchsuchen

standardize timing to second instead of millisecond

Gary Paduana vor 9 Jahren
Ursprung
Commit
9b50358e40
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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]
     }
 }