rex-core 0.1.19 → 0.1.20
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/lib/rex/core/version.rb +1 -1
- data/lib/rex/stopwatch.rb +10 -5
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cacc2616718c8056c7ff5ecf2626562f71ac9efd0a6ae69c80cd21565824b666
|
4
|
+
data.tar.gz: e6ed793586462b6cc826be77b533030e45a7bce1ae4fd0bdb2cbaf62ed6e17dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7367cb540a9638f4f64e5756f3c9761e3ebe05f15444ee2d4ae8e6f6af94888f50e2813cc89e7ef3bc7492335f20c31ccc98c8c3ba4b2a55e61995b174c8497
|
7
|
+
data.tar.gz: 4dbd3f07ec237c23ca088bbbdc2f67e2a59bcf5167bcebe841550877fc99f1e81ef3a9c763ddb9c7d8478844676e08ee3f706188c721049be00fbe2b3350ef89
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rex/core/version.rb
CHANGED
data/lib/rex/stopwatch.rb
CHANGED
@@ -1,16 +1,21 @@
|
|
1
|
-
module Rex
|
1
|
+
module Rex::Stopwatch
|
2
2
|
|
3
3
|
# This provides a correct way to time an operation provided within a block.
|
4
4
|
#
|
5
5
|
# @see https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/
|
6
|
+
# @see https://ruby-doc.org/core-2.7.1/Process.html#method-c-clock_gettime
|
7
|
+
#
|
8
|
+
# @param [Symbol] unit The unit of time in which to measure the duration. The
|
9
|
+
# argument is passed to Process.clock_gettime which defines the acceptable
|
10
|
+
# values.
|
6
11
|
#
|
7
12
|
# @yield [] The block whose operation should be timed.
|
8
13
|
#
|
9
|
-
# @return Returns the result of the block and the elapsed time in
|
10
|
-
def self.
|
11
|
-
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
14
|
+
# @return Returns the result of the block and the elapsed time in the specified unit.
|
15
|
+
def self.elapsed_time(unit: :float_second)
|
16
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC, unit)
|
12
17
|
ret = yield
|
13
|
-
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
18
|
+
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC, unit) - start
|
14
19
|
|
15
20
|
[ret, elapsed]
|
16
21
|
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.
|
4
|
+
version: 0.1.20
|
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-11-
|
96
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
��
|
1
|
+
#¦����'}����sU�ʖ'V������ވ�nq��/�
|
2
|
+
�J:��VeQ�1�����tw�"���JK��2�������|n#�t`��U�3�v$[5����|�㣏�r�Mӵ�Yͳ��vEa�����|�A!nښ�Ҍ�Ҧ`w���/N�qq�������m\v���S-�4�[�lӘ����mS����vgǑu����ގ�U��v�3?��`U�4q�Ȅ
|