time

smile.util.`package`.time
object time

Measure running time of a function/block

Attributes

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

Members list

Value members

Concrete methods

def apply[A](f: => A): A

Executes a code block and measure the running time.

Executes a code block and measure the running time.

Type parameters

A

The output type of code block.

Value parameters

f

a code block to measure the running time.

Attributes

Returns

the code block expression result.

def apply[A](message: String)(f: => A): A

Executes a code block and measure the running time.

Executes a code block and measure the running time.

Type parameters

A

The output type of code block.

Value parameters

f

a code block to measure the running time.

message

the log message.

Attributes

Returns

the code block expression result.

def off(): Unit

Turn on printing out running time.

Turn on printing out running time.

Attributes

def on(): Unit

Turn on printing out running time.

Turn on printing out running time.

Attributes

Concrete fields

var echo: Boolean

Print out switch.

Print out switch.

Attributes