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