uv-rays 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5ba5df00f6948a972973d5bfbd9a41af4f5a5d6
4
- data.tar.gz: d8dd4e730a3b5152eeaf3b2c85f1dd5939788014
3
+ metadata.gz: 62df253a515b6fc5dc5168365ffaccc6341e9432
4
+ data.tar.gz: 34ece239ae56c171c8a125656ba701b3fc66a9c6
5
5
  SHA512:
6
- metadata.gz: bf3d5fbef4c6587d85bfc99aa6dc0ec3647877d5382c12d2fb5602cba3b34da321ca0e173076a998ecd9e45051fad7730f6ff36a937004c3a862cdc658db41e1
7
- data.tar.gz: d02305fa34106ed9d314f5d1d3bb4b2d353689bf1a296eb9a0e0cfb47f7a180afd35d3764da4a3bad5d55f9f5b5c85741ffb5ea6308039e064f2db05d9df2a8f
6
+ metadata.gz: 714f784bf6f21ad6b8098c451564d775e9328bb0a21dc196dfdb9321b50ea31212ea2be292f20515540d5db5a38c93cbfe2ef993345dc4fbdece3a68a6f6ff03
7
+ data.tar.gz: c9f9ab7c2fef8a1c0ec1b948f1292f001fd1d2c03727d497ba013423e3dfa6d70bf7e6226a04ff3d9eb3467e3cb2ffcae727e3c9ac1886d745739176bc23fb18
@@ -24,6 +24,11 @@ module UV
24
24
  super(loop, defer)
25
25
  end
26
26
 
27
+ # Provide relevant inspect information
28
+ def inspect
29
+ "#<#{self.class}:0x#{self.__id__.to_s(16)} next_scheduled=#{@next_scheduled} trigger_count=#{@trigger_count} last_scheduled=#{@last_scheduled} created=#{@created}>"
30
+ end
31
+
27
32
  # required for comparable
28
33
  def <=>(anOther)
29
34
  @next_scheduled <=> anOther.next_scheduled
@@ -140,6 +145,7 @@ module UV
140
145
  class Scheduler
141
146
  attr_reader :loop
142
147
  attr_reader :time_diff
148
+ attr_reader :next
143
149
 
144
150
 
145
151
  def initialize(loop)
@@ -294,9 +300,8 @@ module UV
294
300
  if in_time > 30
295
301
  @timer.start(in_time)
296
302
  else
297
- @loop.next_tick do
298
- on_timer
299
- end
303
+ # Effectively next tick
304
+ @timer.start(0)
300
305
  end
301
306
  end
302
307
  end
@@ -124,11 +124,11 @@ module UV
124
124
 
125
125
  time = @timezone ? @timezone.utc_to_local(from.getutc) : from
126
126
 
127
- time = time.respond_to?(:round) ? time.round : time - time.usec * 1e-6
128
- # chop off subseconds (and yes, Ruby 1.8 doesn't have #round)
127
+ time = time.round
128
+ # chop off subseconds
129
129
 
130
130
  time = time + 1
131
- # start at the next second
131
+ # start at the next second
132
132
 
133
133
  loop do
134
134
 
@@ -196,7 +196,7 @@ module UV
196
196
  ]
197
197
  end
198
198
 
199
- # Returns the shortest delta between two potential occurences of the
199
+ # Returns the shortest delta between two potential occurrences of the
200
200
  # schedule described by this cronline.
201
201
  #
202
202
  def frequency
@@ -1,3 +1,3 @@
1
1
  module UV
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uv-rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-15 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libuv