measureLoad
Measures the amount of time in milliseconds it takes to execute the given block. Example:
measureLoad("Waited for {time}") {
// wait for 100 ms
Thread.sleep(100)
}
Content copied to clipboard
Sample console output:
Waited for 100ms
Content copied to clipboard
Parameters
message
The message to print. You can use '{time}' to replace with the amount of time in ms
block
The block to execute