Removed all code that uses OpenGL from Image.
[io/quag.git] / addons / Loki / tests / testcg.io
blob1012ac11045f1cecfcc1fb02d023e671caa0100d
2 Directory setCurrentWorkingDirectory("Loki")
3 doFile("Loki.io")
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(
20 newSlot("timer",0)
22 // init := method( self timer := 0 )
24 measure := method(
25 c := Utils rdtsc
26 r := call evalArgAt(0)
27 // timer println
28 timer = timer + (Utils rdtsc-c)
29 // timer println
32 asString := method( "#{timer / (3* (10 **(9)))} sec" interpolate )
33 reset := method( timer = 0 )
37 chrono := method(
38 c := Utils rdtsc
39 call evalArgAt(0)
40 c = Utils rdtsc-c
41 "#{c / (3* (10 **(9)))} sec" interpolate
42 )*/
45 "Done."