MCPcopy Index your code
hub / github.com/prometheus/client_python / set_to_current_time

Method set_to_current_time

prometheus_client/metrics.py:466–468  ·  view source on GitHub ↗

Set gauge to the current unixtime.

(self)

Source from the content-addressed store, hash-verified

464 self._value.set(float(value))
465
466 def set_to_current_time(self) -> None:
467 """Set gauge to the current unixtime."""
468 self.set(time.time())
469
470 def track_inprogress(self) -> InprogressTracker:
471 """Track inprogress blocks of code or functions.

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
timeMethod · 0.45

Tested by

no test coverage detected