2 Directory setCurrentWorkingDirectory("Loki")
4 Directory setCurrentWorkingDirectory("..")
6 IoVM Utils
:= Object clone
8 Loki Implementation
linkToAs( Utils
, "rdtsc_" ) with( _self state
numberWithDouble(double rdtsc asFloat64
) )
10 Utils rdtsc
:= Utils
getSlot("rdtsc_") clone
12 Loki Implementation
linkToAs( Sequence
, "getByteStringPointer" ) with(
13 _self state
numberWithDouble( (_self data
.ptr
castAs(ByteArray
) bytes asFloat64
) )
19 Chrono
:= Object clone do(
22 // init
:= method( self timer
:= 0 )
26 r
:= call
evalArgAt(0)
28 timer
= timer
+ (Utils rdtsc
-c
)
32 asString
:= method( "#{timer / (3* (10 **(9)))} sec" interpolate
)
33 reset
:= method( timer
= 0 )
41 "#{c / (3* (10 **(9)))} sec" interpolate