time-pause-until 1 user commands nosh
time-pause-until wait until a given time
`time-pause-until` timestamp next-prog

## Description

`time-pause-until` parses timestamp to yield a TAI64N time. It sleeps until that time has passed, and then chain loads to next-prog with the execvp 3 function.

next-prog may contain its own command line options, which `time-pause-until` will ignore.

The format of timestamp is as explained in the manual for time-print-tai64n 1. If the timestamp is null `time-pause-until` sleeps forever; otherwise it sleeps for 1 day, 1 hour, 10 minutes, 1 minute, or the time remaining, whichever is the shorter, recalculating how long it has to sleep for whenever it wakes up. This sleep pattern allows the system clock to be adjusted by the adjtimex 3 function, adjusting the sleep length to match the revised period to the target time.

This is not quite perfect and can overshoot, but the imperfection is covered by the definition that `time-pause-until` sleeps until after the target time has passed, not until the exact point of the target time. If adjtimex 3 is used to slew the system clock, it will not overshoot by very much. If the system clock is stepped, however, it can overshoot by a significant amount depending from the size of the step. This is a basic problem with stepping the system clock; inherent in the fact that the operating system does not provide an absolute time sleep mechanism, only a mechanism for sleeping for relative time periods.

## Author

Jonathan de Boyne Pollard