Class: GitLab::Exporter::TimeTracker
- Inherits:
-
Object
- Object
- GitLab::Exporter::TimeTracker
- Defined in:
- lib/gitlab_exporter/util.rb
Overview
Time tracking object
Provides a simple time tracking, and returns back the result plus the tracked time wraped in a TrackedResult struct
Instance Method Summary collapse
Instance Method Details
#track ⇒ Object
17 18 19 20 21 |
# File 'lib/gitlab_exporter/util.rb', line 17 def track @start = Time.now.to_f result = yield TrackedResult.new(result, Time.now.to_f - @start) end |