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