walltime 0.0.6 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/version.rb +2 -2
  3. data/lib/walltime.rb +11 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80995fe2cc8e7d72e5986edc4a563dc580a304d2
4
- data.tar.gz: 97516c3e049c29b348d159a8c43bdcd5318b2508
3
+ metadata.gz: eb653022ecae9dab1cfcd0ef4484c525cc70b52b
4
+ data.tar.gz: ba0e8a5a71f0f23d1aac73053edbe1ae719c449f
5
5
  SHA512:
6
- metadata.gz: 4e0fe1ab3e178f657f6b82dafcce7cc8e3e26cee2112a1a3d4adc336169c120b597b218341e87689480528e9c98b4ff72231d47083dbfc6a9c23141deb28f36e
7
- data.tar.gz: 7e4adb3188cdb2123f1246c313b41d3dd90e55834fee5ce55fee028fe889615bd74908432c2445d8e328d0aefaea6a73e5556d67bceb947bc470ae74f288668a
6
+ metadata.gz: 6744bb56b7ea65a7fe1448a317fae2098fa988d843c9fb60e1a8afb7f28ed9d5993571bd7db802c2ea15256802a479a971dae3217bdb7ecdce981dfed8856531
7
+ data.tar.gz: 9af5ab2459444b3361580fefd5adf42c545aea20468c2bc0c741fdab2b4de0ea8f53402cc15b7822877b7203e6acb249c86f0dca592de131ef63eacd810d4ea5
data/lib/version.rb CHANGED
@@ -4,8 +4,8 @@ module Walltime #:nodoc:
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 0
7
- TINY = 6
8
- CODENAME = "Its all Giraffes my son!"
7
+ TINY = 9
8
+ CODENAME = "With the Funky Onion!"
9
9
 
10
10
  STRING = [MAJOR, MINOR, TINY].join('.')
11
11
 
data/lib/walltime.rb CHANGED
@@ -10,6 +10,7 @@
10
10
 
11
11
  module NumTools
12
12
 
13
+ # Implement more if you wish only interested in round myself right now.
13
14
  def random_between(min, max); min+rand(max); end
14
15
 
15
16
  def self.define_component(name)
@@ -66,5 +67,15 @@ class Stopwatch
66
67
  intervalh
67
68
  end
68
69
  end
70
+
71
+ def start(&block)
72
+ watch('start')
73
+ block.call
74
+ end
75
+
76
+ def stop(&block)
77
+ block.call
78
+ watch('stop')
79
+ end
69
80
 
70
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: walltime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hood