Class TimeUtil


  • public final class TimeUtil
    extends Object
    Author:
    Stephen Mallette (http://stephen.genoprime.com), Daniel Kuppitz (http://gremlin.guru)
    • Method Detail

      • secondsSince

        public static long secondsSince​(long startNanos)
      • millisSince

        public static long millisSince​(long startNanos)
      • minutesSince

        public static long minutesSince​(long startNanos)
      • timeSince

        public static long timeSince​(long startNanos,
                                     TimeUnit destUnit)
      • clock

        public static double clock​(Runnable runnable)
      • clock

        public static double clock​(int loops,
                                   Runnable runnable)
      • clockWithResult

        public static <S> org.javatuples.Pair<Double,​S> clockWithResult​(Supplier<S> supplier)
      • clockWithResult

        public static <S> org.javatuples.Pair<Double,​S> clockWithResult​(int loops,
                                                                              Supplier<S> supplier)