TimeUtils

io.joern.x2cpg.utils.TimeUtils
object TimeUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TimeUtils.type

Members list

Value members

Concrete methods

def pretty(duration: Long): String

Selects most appropriate TimeUnit for given duration and formats it accordingly

Selects most appropriate TimeUnit for given duration and formats it accordingly

Attributes

def runWithTimeout[T](timeoutMs: Long)(f: => T): Try[T]
def time[R](block: => R): (R, Long)

Measures elapsed time for executing a block in nanoseconds

Measures elapsed time for executing a block in nanoseconds

Attributes