Class: Command::Update::Interval
- Inherits:
-
Object
- Object
- Command::Update::Interval
- Defined in:
- lib/command/update/interval.rb
Constant Summary collapse
- MIN =
作品間ウェイトの最低秒数(処理時間含む)
2.5
- FORCE_WAIT_TIME =
強制待機時間
2.0
Instance Method Summary collapse
- #force_wait ⇒ Object
-
#initialize(interval) ⇒ Interval
constructor
A new instance of Interval.
- #wait ⇒ Object
Constructor Details
Instance Method Details
#force_wait ⇒ Object
24 25 26 |
# File 'lib/command/update/interval.rb', line 24 def force_wait sleep(FORCE_WAIT_TIME) end |
#wait ⇒ Object
18 19 20 21 22 |
# File 'lib/command/update/interval.rb', line 18 def wait wait_time = Time.now - @time sleep(@interval_time - wait_time) if wait_time < @interval_time @time = Time.now end |