rex-core 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00105f554d3867d9592962e1947385e8a4c24993a282e68aeb783b9577723d18
4
- data.tar.gz: '094b794760fc51748acd69ee3eb84e0116e8c70fe62dac39c9369eef7bdb61f6'
3
+ metadata.gz: 4b2bbdcc1a0301230c6fdd17df19375ba3ee885852b14b7096736294539d566b
4
+ data.tar.gz: f474c211aa36c95dc0dbdf5b05b591d2fd1cc98bd1cec5c877deea37fe2986e2
5
5
  SHA512:
6
- metadata.gz: d6bfacda21b3c5f5dfdef68f9b82e0dabd703c4f429fa6df3582516babe96876a735c4597f2d52e74a57e8bc769b68db89bc82e751f602e6f99c73601f464b6e
7
- data.tar.gz: '0159dd0334f7ac82d5c8df4d09b9b6b27126ae085a0557baf87e1eafd43487d6575d45e995d0f9f46d6bc0dc75585adeb37c2a0393d2bd9260070020be393045'
6
+ metadata.gz: 247e60760168cfaeebce318e982939b6100f7ea2fe278914a11261b9eaf9933db6f5754b1b4afd859ec4aa2d7fb4379065a7505a1d5bae0565b5c10f56d56b4f
7
+ data.tar.gz: 234380d838b2687ea3b80575f406430daebed9cfd3292be43db94b3ebb6c948a909d309cb6a20901d27daef423179f8ee92c548cd78ed078dcd2a5815d6969cf
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Core
3
- VERSION = "0.1.18"
3
+ VERSION = "0.1.19"
4
4
  end
5
5
  end
@@ -0,0 +1,18 @@
1
+ module Rex
2
+
3
+ # This provides a correct way to time an operation provided within a block.
4
+ #
5
+ # @see https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/
6
+ #
7
+ # @yield [] The block whose operation should be timed.
8
+ #
9
+ # @return Returns the result of the block and the elapsed time in seconds.
10
+ def self.stopwatch
11
+ start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
12
+ ret = yield
13
+ elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
14
+
15
+ [ret, elapsed]
16
+ end
17
+
18
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2021-09-29 00:00:00.000000000 Z
96
+ date: 2021-11-15 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rake
@@ -151,6 +151,7 @@ files:
151
151
  - lib/rex/io/stream.rb
152
152
  - lib/rex/io/stream_abstraction.rb
153
153
  - lib/rex/io/stream_server.rb
154
+ - lib/rex/stopwatch.rb
154
155
  - lib/rex/sync.rb
155
156
  - lib/rex/sync/event.rb
156
157
  - lib/rex/sync/read_write_lock.rb
metadata.gz.sig CHANGED
Binary file