murasaki 0.2.1 → 0.2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/murasaki/event_loop.rb +6 -5
- data/lib/murasaki/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a215230abbb509a890da12a276fa95ba32990d1f297cd73e177c765e5f346e3
|
4
|
+
data.tar.gz: f983c291f51c8eee403c4174c03091a7c81441b73a5bc81ade080464925140bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58cb8a6c1271fc8d388dea834aa36f1d2ce0e41193769875996b015aeee4efca8acb52052509d381f3991e2fdbb4d454d57c93cd3dfb38c922c21dab2cd01be0
|
7
|
+
data.tar.gz: 3990b258aa7bb692ad62ec64ac867a2532824dab0ab8dd28e49389d28d68193845b6af800c7af24843330cdd91d13c0cd02b190b568a03cb71bd5ab30d7c751e
|
data/lib/murasaki/event_loop.rb
CHANGED
@@ -103,12 +103,13 @@ module EventLoop
|
|
103
103
|
# @return [nil] nil
|
104
104
|
def timer_once
|
105
105
|
now_time = Time.now.to_f
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
callbacks = []
|
107
|
+
@timers.reject! do |timer|
|
108
|
+
ticked = timer.start_time < now_time
|
109
|
+
callbacks << timer.callback if ticked
|
110
|
+
ticked
|
111
111
|
end
|
112
|
+
callbacks.each { |c| c.call }
|
112
113
|
nil
|
113
114
|
end
|
114
115
|
|
data/lib/murasaki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: murasaki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.1
|
4
|
+
version: 0.2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HeckPsi Lab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nio4r
|