We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a18b70 commit a38a1f8Copy full SHA for a38a1f8
torchx/runner/events/__init__.py
@@ -91,10 +91,12 @@ def __init__(
91
)
92
self._start_cpu_time_ns = 0
93
self._start_wall_time_ns = 0
94
+ self._start_epoch_time_usec = 0
95
96
def __enter__(self) -> "log_event":
97
self._start_cpu_time_ns = time.process_time_ns()
98
self._start_wall_time_ns = time.perf_counter_ns()
99
+ self._start_epoch_time_usec = int(time.time() * 1000)
100
return self
101
102
def __exit__(
torchx/runner/events/api.py
@@ -46,6 +46,7 @@ class TorchxEvent:
46
source: SourceType = SourceType.UNKNOWN
47
cpu_time_usec: Optional[int] = None
48
wall_time_usec: Optional[int] = None
49
+ start_epoch_time_usec: Optional[int] = None
50
51
def __str__(self) -> str:
52
return self.serialize()
0 commit comments