# File lib/system_timer.rb, line 44
44:     def timeout_after(seconds, exception_class = nil)
45:       new_timer = nil                                      # just for scope
46:       @monitor.synchronize do
47:         new_timer = timer_pool.add_timer seconds, exception_class
48:         timer_interval = timer_pool.next_trigger_interval_in_seconds
49:         debug "==== Install Timer ==== at #{Time.now.to_f}, next interval: #{timer_interval}"
50:         if timer_pool.first_timer?
51:           install_first_timer_and_save_original_configuration timer_interval
52:         else
53:           install_next_timer timer_interval
54:         end
55:      end
56:       return yield
57:     ensure
58:       @monitor.synchronize do
59:         debug "==== Cleanup Timer ==== at #{Time.now.to_f}, #{new_timer} "
60:         timer_pool.cancel new_timer
61:         timer_pool.log_registered_timers if debug_enabled?
62:         next_interval = timer_pool.next_trigger_interval_in_seconds
63:         debug "Cleanup Timer : next interval #{next_interval.inspect} "
64:         if next_interval
65:           install_next_timer next_interval
66:         else
67:           restore_original_configuration          
68:         end
69:       end
70:     end