timers 4.1.2 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rspec +1 -4
- data/.travis.yml +15 -17
- data/Gemfile +7 -11
- data/README.md +60 -24
- data/Rakefile +2 -6
- data/lib/timers.rb +5 -0
- data/lib/timers/events.rb +108 -106
- data/lib/timers/group.rb +124 -119
- data/lib/timers/interval.rb +43 -0
- data/lib/timers/timer.rb +121 -116
- data/lib/timers/version.rb +6 -1
- data/lib/timers/wait.rb +47 -42
- data/spec/spec_helper.rb +30 -13
- data/spec/timers/cancel_spec.rb +33 -28
- data/spec/timers/events_spec.rb +40 -35
- data/spec/timers/every_spec.rb +27 -22
- data/spec/timers/group_spec.rb +247 -242
- data/spec/timers/performance_spec.rb +83 -54
- data/spec/timers/strict_spec.rb +37 -32
- data/spec/timers/wait_spec.rb +22 -17
- data/timers.gemspec +27 -20
- metadata +29 -18
- data/.coveralls.yml +0 -1
- data/.rubocop.yml +0 -28
- data/.ruby-version +0 -1
- data/AUTHORS.md +0 -15
- data/CHANGES.md +0 -62
- data/LICENSE +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e1665f074c230a801e0eb6648214a6d0248d4baada8da1f4e60abd0983bba517
|
4
|
+
data.tar.gz: de4eac12ecba1826d6ae5ef1d6958a451595b1a9e8e54dba7f1718d7f15182dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e005f02975d324b7fbe7d8e284a2d5318be78352e129ce00abf20594d3e6a18b30103e1137b2d9fe91bd5a2251e7b22fb5cdc255f5153f219bf90bd3b6160d
|
7
|
+
data.tar.gz: 64210a85d0a8efe2540d9ee6da050c5d8298a5332bd2ba14758bd784a7f991ad40b1f828b47320525ab025249859ca6419f172421492fe6ced56a76e34820541
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
rvm:
|
7
|
-
- 2.0.0
|
8
|
-
- 2.1.10
|
9
|
-
- 2.2.6
|
10
|
-
- 2.3.3
|
11
|
-
- jruby-9.1.6.0
|
3
|
+
dist: xenial
|
4
|
+
cache: bundler
|
12
5
|
|
13
6
|
matrix:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
include:
|
8
|
+
- rvm: 2.3
|
9
|
+
- rvm: 2.4
|
10
|
+
- rvm: 2.5
|
11
|
+
- rvm: 2.6
|
12
|
+
- rvm: jruby-head
|
13
|
+
- rvm: truffleruby
|
14
|
+
- rvm: ruby-head
|
15
|
+
- rvm: rbx-3
|
16
|
+
allow_failures:
|
17
|
+
- rvm: ruby-head
|
18
|
+
- rvm: rbx-3
|
19
|
+
- rvm: truffleruby
|
data/Gemfile
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
1
|
+
source 'https://rubygems.org'
|
4
2
|
|
5
3
|
gemspec
|
6
4
|
|
7
5
|
group :development do
|
8
|
-
|
6
|
+
gem 'pry'
|
9
7
|
end
|
10
8
|
|
11
9
|
group :test do
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
group :development, :test do
|
18
|
-
gem "rake"
|
10
|
+
gem 'benchmark-ips'
|
11
|
+
gem "ruby-prof", platform: :mri
|
12
|
+
|
13
|
+
gem 'simplecov'
|
14
|
+
gem 'coveralls'
|
19
15
|
end
|
data/README.md
CHANGED
@@ -1,29 +1,28 @@
|
|
1
|
-
# Timers
|
1
|
+
# Timers
|
2
2
|
|
3
|
-
|
4
|
-
[gem-link]: http://rubygems.org/gems/timers
|
5
|
-
[build-image]: https://secure.travis-ci.org/celluloid/timers.svg?branch=master
|
6
|
-
[build-link]: https://travis-ci.org/celluloid/timers
|
7
|
-
[codeclimate-image]: https://codeclimate.com/github/celluloid/timers.svg
|
8
|
-
[codeclimate-link]: https://codeclimate.com/github/celluloid/timers
|
9
|
-
[coverage-image]: https://coveralls.io/repos/celluloid/timers/badge.svg?branch=master
|
10
|
-
[coverage-link]: https://coveralls.io/r/celluloid/timers
|
11
|
-
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
|
12
|
-
[license-link]: https://github.com/celluloid/timers/master/LICENSE.txt
|
3
|
+
Collections of one-shot and periodic timers, intended for use with event loops such as [async].
|
13
4
|
|
14
|
-
|
5
|
+
[![Build Status](https://secure.travis-ci.org/socketry/timers.svg)](https://travis-ci.org/socketry/timers)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/socketry/timers.svg)](https://codeclimate.com/github/socketry/timers)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/socketry/timers/badge.svg)](https://coveralls.io/r/socketry/timers)
|
15
8
|
|
16
|
-
|
17
|
-
to provide the timer subsystem for [Celluloid], it can be used independently
|
18
|
-
in any sort of event loop context, or can provide a purely timer-based event
|
19
|
-
loop itself.
|
9
|
+
[async]: https://github.com/socketry/async
|
20
10
|
|
21
|
-
|
11
|
+
## Installation
|
22
12
|
|
23
|
-
|
13
|
+
Add this line to your application's Gemfile:
|
24
14
|
|
25
|
-
|
26
|
-
|
15
|
+
```ruby
|
16
|
+
gem 'timers'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install timers
|
27
26
|
|
28
27
|
## Usage
|
29
28
|
|
@@ -105,9 +104,46 @@ timers.resume
|
|
105
104
|
10.times { timers.wait } # will fire all timers
|
106
105
|
```
|
107
106
|
|
108
|
-
##
|
107
|
+
## Contributing
|
109
108
|
|
110
|
-
|
111
|
-
|
109
|
+
1. Fork it
|
110
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
111
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
112
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
113
|
+
5. Create new Pull Request
|
114
|
+
|
115
|
+
## License
|
112
116
|
|
113
|
-
|
117
|
+
Released under the MIT license.
|
118
|
+
|
119
|
+
Copyright, 2018, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
120
|
+
Copyright, 2016, by [Tony Arcieri](bascule@gmail.com).
|
121
|
+
Copyright, 2016, by Jeremy Hinegardner.
|
122
|
+
Copyright, 2016, by Sean Gregory.
|
123
|
+
Copyright, 2016, by Chuck Remes.
|
124
|
+
Copyright, 2016, by Utenmiki.
|
125
|
+
Copyright, 2016, by Ron Evans.
|
126
|
+
Copyright, 2016, by Larry Lv.
|
127
|
+
Copyright, 2016, by Bruno Enten.
|
128
|
+
Copyright, 2016, by Jesse Cooke.
|
129
|
+
Copyright, 2016, by Nicholas Evans.
|
130
|
+
Copyright, 2016, by Dimitrij Denissenko.
|
131
|
+
Copyright, 2016, by Ryan LeCompte.
|
132
|
+
|
133
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
134
|
+
of this software and associated documentation files (the "Software"), to deal
|
135
|
+
in the Software without restriction, including without limitation the rights
|
136
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
137
|
+
copies of the Software, and to permit persons to whom the Software is
|
138
|
+
furnished to do so, subject to the following conditions:
|
139
|
+
|
140
|
+
The above copyright notice and this permission notice shall be included in
|
141
|
+
all copies or substantial portions of the Software.
|
142
|
+
|
143
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
144
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
145
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
146
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
147
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
148
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
149
|
+
THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
1
|
require "bundler/gem_tasks"
|
3
|
-
|
4
2
|
require "rspec/core/rake_task"
|
5
|
-
RSpec::Core::RakeTask.new
|
6
3
|
|
7
|
-
|
8
|
-
RuboCop::RakeTask.new
|
4
|
+
RSpec::Core::RakeTask.new(:test)
|
9
5
|
|
10
|
-
task default
|
6
|
+
task :default => :test
|
data/lib/timers.rb
CHANGED
data/lib/timers/events.rb
CHANGED
@@ -1,111 +1,113 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# This file is part of the "timers" project and released under the MIT license.
|
4
|
+
#
|
5
|
+
# Copyright, 2018, by Samuel Williams. All rights reserved.
|
6
|
+
#
|
2
7
|
|
3
|
-
|
4
|
-
require "hitimes"
|
5
|
-
|
6
|
-
require "timers/timer"
|
8
|
+
require_relative "timer"
|
7
9
|
|
8
10
|
module Timers
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
11
|
+
# Maintains an ordered list of events, which can be cancelled.
|
12
|
+
class Events
|
13
|
+
# Represents a cancellable handle for a specific timer event.
|
14
|
+
class Handle
|
15
|
+
def initialize(time, callback)
|
16
|
+
@time = time
|
17
|
+
@callback = callback
|
18
|
+
end
|
19
|
+
|
20
|
+
# The absolute time that the handle should be fired at.
|
21
|
+
attr_reader :time
|
22
|
+
|
23
|
+
# Cancel this timer, O(1).
|
24
|
+
def cancel!
|
25
|
+
# The simplest way to keep track of cancelled status is to nullify the
|
26
|
+
# callback. This should also be optimal for garbage collection.
|
27
|
+
@callback = nil
|
28
|
+
end
|
29
|
+
|
30
|
+
# Has this timer been cancelled? Cancelled timer's don't fire.
|
31
|
+
def cancelled?
|
32
|
+
@callback.nil?
|
33
|
+
end
|
34
|
+
|
35
|
+
def >(other)
|
36
|
+
@time > other.to_f
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_f
|
40
|
+
@time
|
41
|
+
end
|
42
|
+
|
43
|
+
# Fire the callback if not cancelled with the given time parameter.
|
44
|
+
def fire(time)
|
45
|
+
@callback.call(time) if @callback
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def initialize
|
50
|
+
# A sequence of handles, maintained in sorted order, future to present.
|
51
|
+
# @sequence.last is the next event to be fired.
|
52
|
+
@sequence = []
|
53
|
+
end
|
54
|
+
|
55
|
+
# Add an event at the given time.
|
56
|
+
def schedule(time, callback)
|
57
|
+
handle = Handle.new(time.to_f, callback)
|
58
|
+
|
59
|
+
index = bisect_left(@sequence, handle)
|
60
|
+
|
61
|
+
# Maintain sorted order, O(logN) insertion time.
|
62
|
+
@sequence.insert(index, handle)
|
63
|
+
|
64
|
+
handle
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns the first non-cancelled handle.
|
68
|
+
def first
|
69
|
+
while (handle = @sequence.last)
|
70
|
+
return handle unless handle.cancelled?
|
71
|
+
@sequence.pop
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns the number of pending (possibly cancelled) events.
|
76
|
+
def size
|
77
|
+
@sequence.size
|
78
|
+
end
|
79
|
+
|
80
|
+
# Fire all handles for which Handle#time is less than the given time.
|
81
|
+
def fire(time)
|
82
|
+
pop(time).reverse_each do |handle|
|
83
|
+
handle.fire(time)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
private
|
88
|
+
|
89
|
+
# Efficiently take k handles for which Handle#time is less than the given
|
90
|
+
# time.
|
91
|
+
def pop(time)
|
92
|
+
index = bisect_left(@sequence, time)
|
93
|
+
|
94
|
+
@sequence.pop(@sequence.size - index)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Return the left-most index where to insert item e, in a list a, assuming
|
98
|
+
# a is sorted in descending order.
|
99
|
+
def bisect_left(a, e, l = 0, u = a.length)
|
100
|
+
while l < u
|
101
|
+
m = l + (u - l).div(2)
|
102
|
+
|
103
|
+
if a[m] > e
|
104
|
+
l = m + 1
|
105
|
+
else
|
106
|
+
u = m
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
l
|
111
|
+
end
|
112
|
+
end
|
111
113
|
end
|
data/lib/timers/group.rb
CHANGED
@@ -1,127 +1,132 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# This file is part of the "timers" project and released under the MIT license.
|
4
|
+
#
|
5
|
+
# Copyright, 2018, by Samuel Williams. All rights reserved.
|
6
|
+
#
|
2
7
|
|
3
8
|
require "set"
|
4
9
|
require "forwardable"
|
5
|
-
require "hitimes"
|
6
10
|
|
7
|
-
|
8
|
-
|
11
|
+
require_relative "interval"
|
12
|
+
require_relative "timer"
|
13
|
+
require_relative "events"
|
9
14
|
|
10
15
|
module Timers
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
16
|
+
# A collection of timers which may fire at different times
|
17
|
+
class Group
|
18
|
+
include Enumerable
|
19
|
+
|
20
|
+
extend Forwardable
|
21
|
+
def_delegators :@timers, :each, :empty?
|
22
|
+
|
23
|
+
def initialize
|
24
|
+
@events = Events.new
|
25
|
+
|
26
|
+
@timers = Set.new
|
27
|
+
@paused_timers = Set.new
|
28
|
+
|
29
|
+
@interval = Interval.new
|
30
|
+
@interval.start
|
31
|
+
end
|
32
|
+
|
33
|
+
# Scheduled events:
|
34
|
+
attr_reader :events
|
35
|
+
|
36
|
+
# Active timers:
|
37
|
+
attr_reader :timers
|
38
|
+
|
39
|
+
# Paused timers:
|
40
|
+
attr_reader :paused_timers
|
41
|
+
|
42
|
+
# Call the given block after the given interval. The first argument will be
|
43
|
+
# the time at which the group was asked to fire timers for.
|
44
|
+
def after(interval, &block)
|
45
|
+
Timer.new(self, interval, false, &block)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Call the given block immediately, and then after the given interval. The first
|
49
|
+
# argument will be the time at which the group was asked to fire timers for.
|
50
|
+
def now_and_after(interval, &block)
|
51
|
+
yield
|
52
|
+
after(interval, &block)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Call the given block periodically at the given interval. The first
|
56
|
+
# argument will be the time at which the group was asked to fire timers for.
|
57
|
+
def every(interval, recur = true, &block)
|
58
|
+
Timer.new(self, interval, recur, &block)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Call the given block immediately, and then periodically at the given interval. The first
|
62
|
+
# argument will be the time at which the group was asked to fire timers for.
|
63
|
+
def now_and_every(interval, recur = true, &block)
|
64
|
+
yield
|
65
|
+
every(interval, recur, &block)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Wait for the next timer and fire it. Can take a block, which should behave
|
69
|
+
# like sleep(n), except that n may be nil (sleep forever) or a negative
|
70
|
+
# number (fire immediately after return).
|
71
|
+
def wait
|
72
|
+
if block_given?
|
73
|
+
yield wait_interval
|
74
|
+
|
75
|
+
while (interval = wait_interval) && interval > 0
|
76
|
+
yield interval
|
77
|
+
end
|
78
|
+
else
|
79
|
+
while (interval = wait_interval) && interval > 0
|
80
|
+
# We cannot assume that sleep will wait for the specified time, it might be +/- a bit.
|
81
|
+
sleep interval
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
fire
|
86
|
+
end
|
87
|
+
|
88
|
+
# Interval to wait until when the next timer will fire.
|
89
|
+
# - nil: no timers
|
90
|
+
# - -ve: timers expired already
|
91
|
+
# - 0: timers ready to fire
|
92
|
+
# - +ve: timers waiting to fire
|
93
|
+
def wait_interval(offset = current_offset)
|
94
|
+
handle = @events.first
|
95
|
+
handle.time - Float(offset) if handle
|
96
|
+
end
|
97
|
+
|
98
|
+
# Fire all timers that are ready.
|
99
|
+
def fire(offset = current_offset)
|
100
|
+
@events.fire(offset)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Pause all timers.
|
104
|
+
def pause
|
105
|
+
@timers.dup.each(&:pause)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Resume all timers.
|
109
|
+
def resume
|
110
|
+
@paused_timers.dup.each(&:resume)
|
111
|
+
end
|
112
|
+
|
113
|
+
alias continue resume
|
114
|
+
|
115
|
+
# Delay all timers.
|
116
|
+
def delay(seconds)
|
117
|
+
@timers.each do |timer|
|
118
|
+
timer.delay(seconds)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Cancel all timers.
|
123
|
+
def cancel
|
124
|
+
@timers.dup.each(&:cancel)
|
125
|
+
end
|
126
|
+
|
127
|
+
# The group's current time.
|
128
|
+
def current_offset
|
129
|
+
@interval.to_f
|
130
|
+
end
|
131
|
+
end
|
127
132
|
end
|