blob: b71824c530351556fc324d2a41bb971baf979f37 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
NAME
sleep-until – sleep until a specified time
SYNOPSIS
sleep-until [CLOCKNAME | TIMEPOINT] ...
DESCRIPTION
Pause until TIMEPOINT. TIMEPOINT is the number of seconds
since Epoch, in UTC but not accounting for leap seconds,
by default. If CLOCKNAME is specified, TIMEPOINT is the
number of seconds since the zerotime of that clock.
TIMEPOINT may be an arbitrary floating point number.
Pause is continued when interrupted.
On Linux 4.2.2 the clocks that can be used are:
* CLOCK_REALTIME
* CLOCK_MONOTONIC
* CLOCK_BOOTTIME
* CLOCK_REALTIME_ALARM
* CLOCK_BOOTTIME_ALARM
Note that the neither the coarse clocks, CLOCK_MONOTONIC_RAW
(the proper implementation of a monotonic clock), nor
CLOCK_TAI work.
RATIONALE
Previously, the best way to sleep until a specific time
was to use date, sleep, and arithmetics in Bash. This is
very inconvenient, and only allows sleep on a monotonic
clock.
This program was written so that the author could combine
it with mplayer to construct a custom alarm clock.
SEE ALSO
sleep(1), date(1)
|