13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/ease_engine/application.rb', line 13
def self.run( options = {} )
EaseEngine::Log.inf( "EaseEngine #{EaseEngine::VERSION} options=#{options}" )
application = new( options )
begin
application.on_start
rescue => err
application.on_error( err )
application.is_update = false
end
while application.is_update
begin
EaseEngine::Frame.update{|sleep_time_usec, sleep_time_f|
application.watcher.watch( sleep_time_f )
}
application.timer.update
application.socket_timer.update
application.on_update
rescue => err
application.on_error( err )
end
end
begin
application.on_end
rescue => err
application.on_error( err )
end
application.exit_status
end
|