io-event 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbd1596a8aee7671e72fa97a26edea4613394765bb99723729228e6e6d5705cd
4
- data.tar.gz: 42039ad9987d6e780e33091a812d9296527591cc7f187bf5c0a23fbf22d77981
3
+ metadata.gz: 53b1f32affa83ac713eaaf8fba4b9a1c9d2f25421908759dde9b5adec11c498f
4
+ data.tar.gz: 6504222eab182d55f2b56ef91c4de9f301f509a69fff17f286c03f0ef0315786
5
5
  SHA512:
6
- metadata.gz: 49c7e7ea64f291f831e77b83fccc5ebd9cc610eb25032bd8c8d2bac5937190bcdaa68da6149831ed90b8a508b7a7ad68cf629663aa03c6f1892272db234ed3ba
7
- data.tar.gz: 1c51c881b4746c819f0967041e3fb580ee5cc79163be5783831a5a72f16d64ad5ca592746d530ec78b77f70590ed81cdffbf34c46b4d46982d950e5ca46e1bfa
6
+ metadata.gz: ac5f863272fb2a532d1adbe16e2960f78dd6f4ce52891e391f301d40bb28ad74e2775348d55610f1f308f7a69b0b362e93f794b44fe94b4ec6e91331a2e851d5
7
+ data.tar.gz: 042a1a3ba4ec1a3e438d823b9d9348eeebc86be2464030744a9a01ff50654aeeb229fb79729083d3f1bdb2feb968dcee8ec320d33de7083196eb1afd887c5ef6
checksums.yaml.gz.sig CHANGED
Binary file
@@ -420,11 +420,8 @@ module IO::Event
420
420
  duration = 0 unless @ready.empty?
421
421
  error = nil
422
422
 
423
- if duration
424
- duration = duration/1.0
425
- if duration > 0
426
- start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
427
- end
423
+ if duration&.>(0)
424
+ start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
428
425
  else
429
426
  @idle_duration = 0.0
430
427
  end
@@ -50,18 +50,19 @@ class IO
50
50
  end
51
51
 
52
52
  # Schedule a block to be called at a specific time in the future.
53
- # @parameter time [Time] The time at which the block should be called, relative to {#now}.
53
+ # @parameter time [Float] The time at which the block should be called, relative to {#now}.
54
54
  def schedule(time, block)
55
55
  handle = Handle.new(time, block)
56
+
56
57
  @scheduled << handle
57
58
 
58
59
  return handle
59
60
  end
60
61
 
61
62
  # Schedule a block to be called after a specific time offset, relative to the current time as returned by {#now}.
62
- # @parameter offset [Time] The time offset from the current time at which the block should be called.
63
+ # @parameter offset [#to_f] The time offset from the current time at which the block should be called.
63
64
  def after(offset, &block)
64
- schedule(self.now + offset, block)
65
+ schedule(self.now + offset.to_f, block)
65
66
  end
66
67
 
67
68
  def wait_interval(now = self.now)
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Event
8
- VERSION = "1.6.3"
8
+ VERSION = "1.6.5"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -44,7 +44,7 @@ cert_chain:
44
44
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
45
45
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
46
46
  -----END CERTIFICATE-----
47
- date: 2024-06-12 00:00:00.000000000 Z
47
+ date: 2024-06-23 00:00:00.000000000 Z
48
48
  dependencies: []
49
49
  description:
50
50
  email:
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.5.9
104
+ rubygems_version: 3.5.11
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: An event loop.
metadata.gz.sig CHANGED
Binary file