Skip to content

Commit 3e50daa

Browse files
committed
feat: add Ferrum::Utils::ElapsedTime#reset
1 parent dad31db commit 3e50daa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ferrum/utils/elapsed_time.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ def start
99
@start ||= monotonic_time
1010
end
1111

12+
def reset
13+
@start = monotonic_time
14+
end
15+
1216
def elapsed_time(start = nil)
1317
monotonic_time - (start || @start)
1418
end

0 commit comments

Comments
 (0)