MCPcopy
hub / github.com/IBM/AssetOpsBench / Timer

Class Timer

src/servers/wo/envelope.py:31–43  ·  view source on GitHub ↗

`with Timer() as t: ...; t.ms` — live millisecond wall time for the metadata block.

Source from the content-addressed store, hash-verified

29
30
31class Timer:
32 """`with Timer() as t: ...; t.ms` — live millisecond wall time for the metadata block."""
33
34 def __enter__(self) -> "Timer":
35 self._start = time.monotonic()
36 return self
37
38 def __exit__(self, *exc) -> None:
39 pass
40
41 @property
42 def ms(self) -> int:
43 return int((time.monotonic() - self._start) * 1000)

Callers 12

list_workordersFunction · 0.90
get_workorderFunction · 0.90
get_workorder_tasksFunction · 0.90
get_workorder_costsFunction · 0.90
get_workorder_kpisFunction · 0.90
get_schedule_calendarFunction · 0.90
create_workorderFunction · 0.90
update_workorderFunction · 0.90
_change_statusFunction · 0.90
assign_technicianFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected