Sha256: e6cef182c9dc9cc5202625307be73552254c289c4b4d5241971f3f0c42c20fbf

Contents?: true

Size: 319 Bytes

Versions: 5

Compression:

Stored size: 319 Bytes

Contents

module Bluepill
  module ProcessConditions
    class RunningTime < ProcessCondition
      def initialize(options = {})
        @below = options[:below]
      end

      def run(pid, _include_children)
        System.running_time(pid)
      end

      def check(value)
        value < @below
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bluepill-0.1.3 lib/bluepill/process_conditions/running_time.rb
bluepill-0.1.2 lib/bluepill/process_conditions/running_time.rb
bluepill-0.1.1 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.70 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.69 lib/bluepill/process_conditions/running_time.rb