Make spec sleep time a float.

This commit is contained in:
Michael Kessler 2011-09-24 11:35:53 +02:00
parent 8365d7c429
commit 1571292ba7
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ branches:
- master - master
- guard_dependencies - guard_dependencies
env: env:
- GUARD_SPEC_SLEEP=2 - GUARD_SLEEP=1.5
notifications: notifications:
recipients: recipients:
- thibaud@thibaud.me - thibaud@thibaud.me

View File

@ -1,10 +1,11 @@
private private
def sleep_time def sleep_time
ENV['GUARD_SPEC_SLEEP'] ? ENV['GUARD_SPEC_SLEEP'].to_i : 1 @sleep_time ||= ENV['GUARD_SLEEP'] ? ENV['GUARD_SLEEP'].to_f : 1
end end
def start def start
puts "ST #{sleep_time}"
sleep(sleep_time) sleep(sleep_time)
@listener.update_last_event @listener.update_last_event
Thread.new { @listener.start } Thread.new { @listener.start }