mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
10 lines
251 B
Plaintext
10 lines
251 B
Plaintext
|
|
class Benchmark {
|
||
|
|
foreign static call(iterations)
|
||
|
|
}
|
||
|
|
|
||
|
|
var result = Benchmark.call(1000000)
|
||
|
|
// Returns false if it didn't calculate the right value. Otherwise returns the
|
||
|
|
// elapsed time.
|
||
|
|
System.print(result is Num)
|
||
|
|
System.print("elapsed: %(result)")
|