summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyrus Akbary <me@syrusakbary.com>2024-04-22 16:00:37 +0200
committerGitHub <noreply@github.com>2024-04-22 16:00:37 +0200
commitb7faeae4fca71ff730b9e856e7ab1235558e0b96 (patch)
tree865c9f1e246f0770b75a8a9f68a7136fb6be7812
parent46671336b26c4ed56f49189d4018bf8b227e7118 (diff)
parent91b8fc76eba0803f67484dfbdfade1fe6c62d403 (diff)
Merge pull request #36 from daichifukui/fix-clock-nanosleep
clock_nanosleep: Use timespec_to_timestamp_exact instead
-rw-r--r--libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c b/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c
index 0e5364a..d15b23e 100644
--- a/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c
+++ b/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c
@@ -24,7 +24,7 @@ int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp,
.u.u.clock.id = clock_id,
.u.u.clock.flags = flags,
};
- if (!timespec_to_timestamp_clamp(rqtp, &sub.u.u.clock.timeout))
+ if (!timespec_to_timestamp_exact(rqtp, &sub.u.u.clock.timeout))
return EINVAL;
// Block until polling event is triggered.