Skip to content

Commit 92bac8e

Browse files
committed
[Build] use timespec_get to get current time
Replace clock_gettime with timespec_get which works on Windows as well. For #4661
1 parent 37cad01 commit 92bac8e

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
@@ -40,7 +40,7 @@ void inline safe_printf(const char* piece) {
4040
long inline time_in_ms() {
4141
// return time in milliseconds, for benchmarking the model speed
4242
struct timespec time;
43-
clock_gettime(CLOCK_REALTIME, &time);
43+
timespec_get(&time, TIME_UTC);
4444
return time.tv_sec * 1000 + time.tv_nsec / 1000000;
4545
}
4646

0 commit comments

Comments
 (0)