aboutsummaryrefslogblamecommitdiffstats
path: root/README
blob: 76d6de90e93977fffe489532a352b32ad399f497 (plain) (tree)
1
2
3
4
5
6
7
8
    
                                                    

        
                                               


                                                                 


                                                                


                                                            









                                                                








                                                                 
        
                         
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 specifed, 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 course clocks, CLOCK_MONOTONIC_RAW
	(the proper implementation of a monotonic clock), and
	CLOCK_TAI does not work.

RATIONALE
	Previously, the best wait to sleep until a specific time
	was to use date, sleep, and arithmetics in Bash. This is
	very inconvenient, and only allows sleep over a monotonic
	clock.

	This progam was written so that the author could combine
	it with mplayer to construct a custom alarm clock.

SEE ALSO
	sleep(1), date(1)