Sha256: 0779f8ab14534b0aad17aa8ba58a26b71baf22f0d781502f4c14bdebe03c0a6f

Contents?: true

Size: 344 Bytes

Versions: 5

Compression:

Stored size: 344 Bytes

Contents

# -*- encoding: utf-8 -*-
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.0.68 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.67 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.66 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.65 lib/bluepill/process_conditions/running_time.rb
bluepill-0.0.64 lib/bluepill/process_conditions/running_time.rb