mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
stopwatch: auto_start option, make pause cumulative
This commit is contained in:
@@ -1494,7 +1494,7 @@ You can also use stopwatches to measure just portions of your code explicitly:
|
||||
```v
|
||||
import time
|
||||
fn main(){
|
||||
sw := time.new_stopwatch()
|
||||
sw := time.new_stopwatch({})
|
||||
println('Hello world')
|
||||
println('Greeting the world took: ${sw.elapsed().nanoseconds()}ns')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user