bluepill-rb/bluepill

View on GitHub
lib/bluepill/process_conditions/running_time.rb

Summary

Maintainability
A
0 mins
Test Coverage
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