Sha256: b236a87b2497a4fc8a6a312a8040b4a4911497d25d0461db8c5b5323f08ea108
Contents?: true
Size: 387 Bytes
Versions: 16
Compression:
Stored size: 387 Bytes
Contents
class ProconBypassMan::Procon::PerformanceMeasurement::LastBypassAt include Singleton attr_accessor :mutex, :last_bypass_at def initialize self.mutex = Mutex.new self.last_bypass_at = Time.now end def self.touch(&block) instance.mutex.synchronize do block.call(Time.now - instance.last_bypass_at) instance.last_bypass_at = Time.now end end end
Version data entries
16 entries across 16 versions & 1 rubygems