Skip to content

Commit 6d2fe1e

Browse files
fix increment
1 parent f56e12c commit 6d2fe1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libc/src/time/windows/clock_getres.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ LLVM_LIBC_FUNCTION(int, clock_getres, (clockid_t id, struct timespec *res)) {
7272
libc_errno = EINVAL;
7373
return -1;
7474
}
75-
DWORD64 tv_sec = time_adjustment / HNS_PER_SEC;
76-
DWORD64 tv_nsec = (time_adjustment % HNS_PER_SEC) * 100ULL;
75+
DWORD64 tv_sec = time_increment / HNS_PER_SEC;
76+
DWORD64 tv_nsec = (time_increment % HNS_PER_SEC) * 100ULL;
7777
if (LIBC_UNLIKELY(tv_sec > SEC_LIMIT)) {
7878
libc_errno = EOVERFLOW;
7979
return -1;
@@ -94,8 +94,8 @@ LLVM_LIBC_FUNCTION(int, clock_getres, (clockid_t id, struct timespec *res)) {
9494
}
9595
DWORD hns_per_sec = static_cast<DWORD>(HNS_PER_SEC);
9696
DWORD sec_limit = static_cast<DWORD>(SEC_LIMIT);
97-
DWORD tv_sec = time_adjustment / hns_per_sec;
98-
DWORD tv_nsec = (time_adjustment % hns_per_sec) * 100UL;
97+
DWORD tv_sec = time_increment / hns_per_sec;
98+
DWORD tv_nsec = (time_increment % hns_per_sec) * 100UL;
9999
if (LIBC_UNLIKELY(tv_sec > sec_limit)) {
100100
libc_errno = EOVERFLOW;
101101
return -1;

0 commit comments

Comments
 (0)