Class: SqsPoller::Common::Utils::Timer
- Inherits:
-
Object
- Object
- SqsPoller::Common::Utils::Timer
- Defined in:
- lib/sqspoller/common/utils.rb
Instance Method Summary collapse
-
#initialize ⇒ Timer
constructor
A new instance of Timer.
- #start ⇒ Object
- #start_time ⇒ Object
- #stop ⇒ Object
- #stop_time ⇒ Object
Constructor Details
#initialize ⇒ Timer
Returns a new instance of Timer.
23 24 25 |
# File 'lib/sqspoller/common/utils.rb', line 23 def initialize start end |
Instance Method Details
#start ⇒ Object
35 36 37 |
# File 'lib/sqspoller/common/utils.rb', line 35 def start @start_time = SqsPoller::Common::Utils.get_current_time_in_millis end |
#start_time ⇒ Object
27 28 29 |
# File 'lib/sqspoller/common/utils.rb', line 27 def start_time @start_time end |
#stop ⇒ Object
39 40 41 42 |
# File 'lib/sqspoller/common/utils.rb', line 39 def stop @stop_time = SqsPoller::Common::Utils.get_current_time_in_millis @stop_time - @start_time end |
#stop_time ⇒ Object
31 32 33 |
# File 'lib/sqspoller/common/utils.rb', line 31 def stop_time @stop_time end |