io-event 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/io/event/selector/epoll.c +9 -12
- data/ext/io/event/selector/kqueue.c +9 -12
- data/ext/io/event/selector/uring.c +9 -12
- data/lib/io/event/selector/select.rb +5 -2
- data/lib/io/event/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbd1596a8aee7671e72fa97a26edea4613394765bb99723729228e6e6d5705cd
|
4
|
+
data.tar.gz: 42039ad9987d6e780e33091a812d9296527591cc7f187bf5c0a23fbf22d77981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c7e7ea64f291f831e77b83fccc5ebd9cc610eb25032bd8c8d2bac5937190bcdaa68da6149831ed90b8a508b7a7ad68cf629663aa03c6f1892272db234ed3ba
|
7
|
+
data.tar.gz: 1c51c881b4746c819f0967041e3fb580ee5cc79163be5783831a5a72f16d64ad5ca592746d530ec78b77f70590ed81cdffbf34c46b4d46982d950e5ca46e1bfa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -786,24 +786,21 @@ struct timespec * make_timeout(VALUE duration, struct timespec * storage) {
|
|
786
786
|
return NULL;
|
787
787
|
}
|
788
788
|
|
789
|
-
if (
|
790
|
-
double value = RFLOAT_VALUE(duration);
|
791
|
-
time_t seconds = value;
|
792
|
-
|
793
|
-
storage->tv_sec = seconds;
|
794
|
-
storage->tv_nsec = (value - seconds) * 1000000000L;
|
795
|
-
|
796
|
-
return storage;
|
797
|
-
}
|
798
|
-
|
799
|
-
else if (RB_INTEGER_TYPE_P(duration)) {
|
789
|
+
if (RB_INTEGER_TYPE_P(duration)) {
|
800
790
|
storage->tv_sec = NUM2TIMET(duration);
|
801
791
|
storage->tv_nsec = 0;
|
802
792
|
|
803
793
|
return storage;
|
804
794
|
}
|
805
795
|
|
806
|
-
|
796
|
+
duration = rb_to_float(duration);
|
797
|
+
double value = RFLOAT_VALUE(duration);
|
798
|
+
time_t seconds = value;
|
799
|
+
|
800
|
+
storage->tv_sec = seconds;
|
801
|
+
storage->tv_nsec = (value - seconds) * 1000000000L;
|
802
|
+
|
803
|
+
return storage;
|
807
804
|
}
|
808
805
|
|
809
806
|
static
|
@@ -799,24 +799,21 @@ struct timespec * make_timeout(VALUE duration, struct timespec * storage) {
|
|
799
799
|
return NULL;
|
800
800
|
}
|
801
801
|
|
802
|
-
if (
|
803
|
-
double value = RFLOAT_VALUE(duration);
|
804
|
-
time_t seconds = value;
|
805
|
-
|
806
|
-
storage->tv_sec = seconds;
|
807
|
-
storage->tv_nsec = (value - seconds) * 1000000000L;
|
808
|
-
|
809
|
-
return storage;
|
810
|
-
}
|
811
|
-
|
812
|
-
else if (RB_INTEGER_TYPE_P(duration)) {
|
802
|
+
if (RB_INTEGER_TYPE_P(duration)) {
|
813
803
|
storage->tv_sec = NUM2TIMET(duration);
|
814
804
|
storage->tv_nsec = 0;
|
815
805
|
|
816
806
|
return storage;
|
817
807
|
}
|
818
808
|
|
819
|
-
|
809
|
+
duration = rb_to_float(duration);
|
810
|
+
double value = RFLOAT_VALUE(duration);
|
811
|
+
time_t seconds = value;
|
812
|
+
|
813
|
+
storage->tv_sec = seconds;
|
814
|
+
storage->tv_nsec = (value - seconds) * 1000000000L;
|
815
|
+
|
816
|
+
return storage;
|
820
817
|
}
|
821
818
|
|
822
819
|
static
|
@@ -901,24 +901,21 @@ struct __kernel_timespec * make_timeout(VALUE duration, struct __kernel_timespec
|
|
901
901
|
return NULL;
|
902
902
|
}
|
903
903
|
|
904
|
-
if (
|
905
|
-
double value = RFLOAT_VALUE(duration);
|
906
|
-
time_t seconds = value;
|
907
|
-
|
908
|
-
storage->tv_sec = seconds;
|
909
|
-
storage->tv_nsec = (value - seconds) * 1000000000L;
|
910
|
-
|
911
|
-
return storage;
|
912
|
-
}
|
913
|
-
|
914
|
-
else if (RB_INTEGER_TYPE_P(duration)) {
|
904
|
+
if (RB_INTEGER_TYPE_P(duration)) {
|
915
905
|
storage->tv_sec = NUM2TIMET(duration);
|
916
906
|
storage->tv_nsec = 0;
|
917
907
|
|
918
908
|
return storage;
|
919
909
|
}
|
920
910
|
|
921
|
-
|
911
|
+
duration = rb_to_float(duration);
|
912
|
+
double value = RFLOAT_VALUE(duration);
|
913
|
+
time_t seconds = value;
|
914
|
+
|
915
|
+
storage->tv_sec = seconds;
|
916
|
+
storage->tv_nsec = (value - seconds) * 1000000000L;
|
917
|
+
|
918
|
+
return storage;
|
922
919
|
}
|
923
920
|
|
924
921
|
static
|
@@ -420,8 +420,11 @@ module IO::Event
|
|
420
420
|
duration = 0 unless @ready.empty?
|
421
421
|
error = nil
|
422
422
|
|
423
|
-
if duration
|
424
|
-
|
423
|
+
if duration
|
424
|
+
duration = duration/1.0
|
425
|
+
if duration > 0
|
426
|
+
start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
427
|
+
end
|
425
428
|
else
|
426
429
|
@idle_duration = 0.0
|
427
430
|
end
|
data/lib/io/event/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|