summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-09-16 22:05:22 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-09-16 22:05:22 +0200
commit7bee53b298185c29dc82badadd07d01995e63584 (patch)
tree03f2004fca17b55e04a2d45921b1beb60e5e7421
parent84f0e9ca1d395b6ff26f34dade8687e587de78d7 (diff)
Remove unused codeHEADmaster
-rw-r--r--main.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/main.c b/main.c
index 9f2f667..ce763f3 100644
--- a/main.c
+++ b/main.c
@@ -130,22 +130,11 @@ main(int argc, char **argv)
if (clock_gettime(CLOCK_REALTIME, &then) == -1)
warn(_("failed to get the time"));
- /* Duration of the clock formatting and printing */
- struct timespec Δ = {
- then.tv_sec - now.tv_sec,
- then.tv_nsec - now.tv_nsec,
- };
- if (Δ.tv_nsec < 0) {
- Δ.tv_nsec += NSEC_PER_SEC;
- Δ.tv_sec--;
- }
-
+ int rv;
struct timespec rqtp = {
.tv_sec = sync(then.tv_sec),
.tv_nsec = 0,
};
-
- int rv;
do
rv = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &rqtp, nullptr);
while (rv == -1 && errno == EINTR);