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
- guard_dependencies
env:
- GUARD_SPEC_SLEEP=2
- GUARD_SLEEP=1.5
notifications:
recipients:
- thibaud@thibaud.me

View File

@ -1,10 +1,11 @@
private
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
def start
puts "ST #{sleep_time}"
sleep(sleep_time)
@listener.update_last_event
Thread.new { @listener.start }