class Dynflow::ClockReference

Public Instance Methods

current_time() click to toggle source
# File lib/dynflow/clock.rb, line 113
def current_time
  Time.now
end
ping(who, time, with_what = nil, where = :<<) click to toggle source
# File lib/dynflow/clock.rb, line 117
def ping(who, time, with_what = nil, where = :<<)
  Type! time, Time, Numeric
  time  = current_time + time if time.is_a? Numeric
  if who.is_a?(Action::Suspended)
    who.plan_event(with_what, time)
  else
    timer = Clock::Timer[who, time, with_what.nil? ? Algebrick::Types::None : Some[Object][with_what], where]
    self.tell([:add_timer, timer])
  end
end