Class: Timer

Inherits:
Object
  • Object
show all
Defined in:
lib/skype/os/timer.rb

Overview

module Skype

module OS
  class Windows

Defined Under Namespace

Classes: Abstruct, Interval, Timeout

Class Method Summary collapse

Class Method Details

.delete(instance) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/skype/os/timer.rb', line 14

def delete instance
  case instance.class
  when Timeout
    instance.delete
  when Interval
    instance.delete
  else
    raise ArgumentError
  end
end

.interval(term, block = Proc.new) ⇒ Object



6
7
8
# File 'lib/skype/os/timer.rb', line 6

def interval term, block=Proc.new
  Interval.new term, block
end

.pollingObject



25
26
27
28
29
# File 'lib/skype/os/timer.rb', line 25

def polling
  now = Time.now.to_i
  Timeout.polling now
  Interval.polling now
end

.timeout(term, block = Proc.new) ⇒ Object



10
11
12
# File 'lib/skype/os/timer.rb', line 10

def timeout term, block=Proc.new
  Timeout.new term, block
end