Lines Matching +full:long +full:- +full:press +full:- +full:mode
9 * kernel's leap-second behavior, as well as how well applications
10 * handle the leap-second discontinuity.
12 * Usage: leap-a-day [-s] [-i <num>]
15 * -s: Each iteration, set the date to 10 seconds before midnight GMT.
21 * -i: Number of iterations to run (default: infinite)
27 * $ gcc leap-a-day.c -o leap-a-day -lrt
71 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
103 * -stable), had an issue with the state machine in clear_time_state()
123 /* Make sure we cleanup on ctrl-c */
189 while ((opt = getopt(argc, argv, "sti:")) != -1) { in main()
192 …printf("Only setting leap-flag, not changing time. It could take up to a day for leap to trigger.\… in main()
202 printf("Usage: %s [-w] [-i <iterations>]\n", argv[0]); in main()
203 printf(" -w: Set flag and wait for leap second each iteration"); in main()
205 printf(" -i: Number of iterations (-1 = infinite, default is 10)\n"); in main()
206 printf(" -t: Print TAI time\n"); in main()
207 exit(-1); in main()
211 /* Make sure TAI support is present if -t was used */ in main()
231 printf("This runs continuously. Press ctrl-c to stop\n"); in main()
233 printf("Running for %i iterations. Press ctrl-c to stop\n", iterations); in main()
247 next_leap += 86400 - (next_leap % 86400); in main()
252 tv.tv_sec = next_leap - 10; in main()
291 printf("Setting timer for %ld - %s", next_leap, ctime(&next_leap)); in main()
296 if (timer_create(CLOCK_REALTIME, &se, &tm1) == -1) { in main()
307 ts.tv_sec = next_leap - 3; in main()
345 buf[strlen(buf)-1] = 0; /*remove trailing\n */ in main()
359 /* Switch to using other mode */ in main()
372 if ((iterations != -1) && !(--iterations)) in main()