Module: LlmCostTracker::Timing
- Defined in:
- lib/llm_cost_tracker/timing.rb
Class Method Summary collapse
Class Method Details
.elapsed_ms(started_at) ⇒ Object
9 10 11 |
# File 'lib/llm_cost_tracker/timing.rb', line 9 def self.elapsed_ms(started_at) ((now_monotonic - started_at) * 1000).round end |
.now_monotonic ⇒ Object
5 6 7 |
# File 'lib/llm_cost_tracker/timing.rb', line 5 def self.now_monotonic Process.clock_gettime(Process::CLOCK_MONOTONIC) end |