Skip to content

Commit 6605c20

Browse files
use explicit quadpart time
1 parent 5b5ed2e commit 6605c20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/src/__support/time/windows/clock_gettime.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ ErrorOr<int> clock_gettime(clockid_t clockid, timespec *ts) {
127127
// HighPart members into the FILETIME structure.
128128
auto kernel_time_hns = cpp::bit_cast<ULARGE_INTEGER>(kernel_time);
129129
auto user_time_hns = cpp::bit_cast<ULARGE_INTEGER>(user_time);
130-
auto total_time_hns = kernel_time_hns.QuadPart + user_time_hns.QuadPart;
130+
unsigned long long total_time_hns =
131+
kernel_time_hns.QuadPart + user_time_hns.QuadPart;
131132

132133
if (LIBC_UNLIKELY(tv_sec > SEC_LIMIT)) {
133134
ret = cpp::unexpected(EOVERFLOW);

0 commit comments

Comments
 (0)