Class: Plushie::Event::Timer

Inherits:
Data
  • Object
show all
Defined in:
lib/plushie/event.rb

Overview

Timer events from interval subscriptions. Triggered periodically by Subscription.every at the specified interval.

Examples:

Timer tick

in Event::Timer[tag: :tick, timestamp:]

Instance Attribute Summary collapse

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



291
292
293
# File 'lib/plushie/event.rb', line 291

def tag
  @tag
end

#tag [Symbol] the tag specified in Subscription.every([Symbol]) ⇒ Object (readonly)

Timer events from interval subscriptions. Triggered periodically by Subscription.every at the specified interval.

Examples:

Timer tick

in Event::Timer[tag: :tick, timestamp:]


291
# File 'lib/plushie/event.rb', line 291

Timer = Data.define(:tag, :timestamp)

#timestampObject (readonly)

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



291
292
293
# File 'lib/plushie/event.rb', line 291

def timestamp
  @timestamp
end

#timestamp [Integer] monotonic timestamp in milliseconds([Integer]) ⇒ Object (readonly)

Timer events from interval subscriptions. Triggered periodically by Subscription.every at the specified interval.

Examples:

Timer tick

in Event::Timer[tag: :tick, timestamp:]


291
# File 'lib/plushie/event.rb', line 291

Timer = Data.define(:tag, :timestamp)