Skip to content

Commit 176f197

Browse files
python3kgaelarryliu0820
authored andcommitted
[Build] use timespec_get to get current time
Replace clock_gettime with timespec_get which works on Windows as well. For #4661
1 parent 37265a1 commit 176f197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/llm/runner/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ET_EXPERIMENTAL void inline safe_printf(const char* piece) {
6868
ET_EXPERIMENTAL long inline time_in_ms() {
6969
// return time in milliseconds, for benchmarking the model speed
7070
struct timespec time;
71-
clock_gettime(CLOCK_REALTIME, &time);
71+
timespec_get(&time, TIME_UTC);
7272
return time.tv_sec * 1000 + time.tv_nsec / 1000000;
7373
}
7474

0 commit comments

Comments
 (0)