/src/wrappers/glib/examples/timer_example.e
Specman e | 28 lines | 25 code | 3 blank | 0 comment | 1 complexity | 42996bdfb57ba6b1eb21be76ab1017c0 MD5 | raw file
1indexing 2 copyright: "(C) 2005 Paolo Redaelli " 3 license: "LGPL v2 or later" 4 date: "$Date:$" 5 revision: "$REvision:$" 6 7class TIMER_EXAMPLE 8 9creation make 10feature 11 timer: G_TIMER 12 make is 13 local t: REAL 14 do 15 create timer 16 print("G_TIMER is "+timer.object_size.out+" bytes long%N") 17 from until timer.elapsed > 10.0 18 loop 19 if (timer.elapsed-t)>0.1 then 20 t := timer.elapsed; 21 (once "Elapsed ").print_on(std_output) 22 timer.elapsed.print_on (std_output) 23 (once " seconds%N").print_on(std_output) 24 end 25 end 26 end 27end 28