Skip to content

Commit aeba507

Browse files
authored
Use time.perf_counter_ns instead of time.time_ns to have sub-microsecond precision on both Linux and Windows (#3220)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 79cebda commit aeba507

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/triton/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, **kwargs):
5454
self.record()
5555

5656
def record(self):
57-
self.timestamp = time.time_ns() / 1_000_000
57+
self.timestamp = time.perf_counter_ns() / 1_000_000
5858

5959
def elapsed_time(self, end):
6060
return end.timestamp - self.timestamp

0 commit comments

Comments
 (0)