Turns a nanosecond time into a human-readable string, like "37 us" or "45 days 08:55:01".
Turns a nanosecond time into a human-readable string, like "37 us" or "45 days 08:55:01".
Times the body, and passes the nanosecond time to the report function as a long.
Times the body, and passes the nanosecond time to the report function as a long.
Times the body, and passes the nanosecond time to the report function as a formatted time string (including units, e.
Times the body, and passes the nanosecond time to the report function as a formatted time string (including units, e.g. "372 ns"), generated by calling the pretty method.
Times the body, then calls pretty on the elapsed time to get a more human-friendly time string, then passes that to the "format" method.
Times the body, then calls pretty on the elapsed time to get a more human-friendly time string, then passes that to the "format" method. For example: timePrettyFormat("This operation took %s", log.debug(_)) { Thread.sleep(1000) }
Would log something close to "This operation took 1 s" to the debug logger.