itimer 9 → 10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/itimer.rb +3 -2
  3. metadata +11 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b571dc4407cd0e99f440b372bc6ac65238471ab
4
- data.tar.gz: 7b9f195720f60ab1803dd3d11fc54db948b6854e
3
+ metadata.gz: 31a2f127807ede55d36f8f74116f823eca7f8def
4
+ data.tar.gz: a340698ca3f78e48428cb8a8d77d1ef2dfcd296e
5
5
  SHA512:
6
- metadata.gz: e4c96589f93b7bf9ce7b07c7bfbf3a459afc3e3e411be51242d5cba7eb21b263c1cedd072e45ce1b99ccd80d761d6a5f50011c41e1c471f5b2fef5368d9da397
7
- data.tar.gz: 275a8aa593509842980f00d0cbb509f8b4180c885edef8eedf316938f73416ceb0673975c2feae9190f4fbf6c8e3c1a54155e971261fc71fd35f6f1b5b976a02
6
+ metadata.gz: 5afd778973f6b45d9a83f1cc76738d3a2380b2460af1050d639e6fdbdd339399313598656b13c2636e977985ee39b641f15e0c8c22e05f05ffa1fcebf1282dd2
7
+ data.tar.gz: a05f0e2934ab0e8eacb3157f597b5f6eceafb7c1852003986cadce297a633a9d2583665413e7a04be4859cacae367871d9abcd8e838fa17f609db3a8f2e333dc
@@ -39,8 +39,9 @@ module Itimer
39
39
  timed_out = false
40
40
  ensure
41
41
  @active_timeout = prev_timeout
42
- if prev_timeout
43
- set(:real, prev_timeout - Time.now)
42
+ now = Time.now
43
+ if prev_timeout && prev_timeout - now > 0
44
+ set(:real, prev_timeout - now)
44
45
  else
45
46
  set(:real, 0)
46
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itimer
3
3
  version: !ruby/object:Gem::Version
4
- version: '9'
4
+ version: '10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Mueller
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-13 00:00:00.000000000 Z
12
+ date: 2014-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.8.0
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.8.0
28
28
  description: Drop-in replacement for stdlib Timeout that uses POSIX interval timers
@@ -36,13 +36,14 @@ extra_rdoc_files: []
36
36
  files:
37
37
  - README.md
38
38
  - Rakefile
39
+ - ext/extconf.rb
40
+ - ext/itimer_native.c
39
41
  - lib/itimer.rb
40
42
  - lib/itimer/compat.rb
41
43
  - test/itimer.rb
42
- - ext/extconf.rb
43
- - ext/itimer_native.c
44
44
  homepage: http://github.com/nearbuy/ruby-itimer
45
- licenses: []
45
+ licenses:
46
+ - MIT
46
47
  metadata: {}
47
48
  post_install_message:
48
49
  rdoc_options: []
@@ -50,17 +51,17 @@ require_paths:
50
51
  - lib
51
52
  required_ruby_version: !ruby/object:Gem::Requirement
52
53
  requirements:
53
- - - '>='
54
+ - - ">="
54
55
  - !ruby/object:Gem::Version
55
56
  version: 1.9.2
56
57
  required_rubygems_version: !ruby/object:Gem::Requirement
57
58
  requirements:
58
- - - '>='
59
+ - - ">="
59
60
  - !ruby/object:Gem::Version
60
61
  version: '0'
61
62
  requirements: []
62
63
  rubyforge_project:
63
- rubygems_version: 2.0.3
64
+ rubygems_version: 2.2.2
64
65
  signing_key:
65
66
  specification_version: 4
66
67
  summary: Timeout replacement using POSIX interval timers