lib/bluepill/process_conditions/file_time.rb in bluepill-0.0.69 vs lib/bluepill/process_conditions/file_time.rb in bluepill-0.0.70
- old
+ new
@@ -5,14 +5,10 @@
@below = options[:below]
@filename = options[:filename]
end
def run(_pid, _include_children)
- if File.exist?(@filename)
- Time.now - File.mtime(@filename)
- else
- nil
- end
+ Time.now - File.mtime(@filename) if File.exist?(@filename)
rescue
$ERROR_INFO
end
def check(value)