|
NAMEdelay - counts down a specified number of seconds.SYNOPSISdelay [options] <length> [-- command] delay [options] until <timespec> [-- command] DESCRIPTIONThe delay program counts down a length of time specified on the command line. By default, it prints out the time remaining once a second. The rate and style of printing can be controlled using options to the program. This includes the ability to supress the printing entirely. It also somewhat supports delaying for fractional seconds.Delay attempts to compensate for the time it spends printing the updates. There should be no error that is a multiple of the time spent delaying. (There is a bit of error on the startup and termination of the program, but that's unavoidable.) There are several ways that the time to delay can be specified. The first is that it can be specified as an absolute length of time to delay. This can be in several formats. All of the following formats are allowable. (And equivalent.) delay 1d 2:03:04.5 delay 1d 2h 3m 4.5s delay 93785.5Please note that the fractional seconds code will only work for actual fractional seconds. So, doing things like '0.5h' will delay for half a second, and not for half an hour as one may expect. (But don't rely on this behavior, as it may change in future versions.) The second format is for a time to delay until be specified. The time parsing code is derived from that used it at, and as a result the time specifications should be described on at(1). For example: delay until 4 pm delay until noon tomorrow delay until midnight 13 september 2000 delay until now + 5 minutesPlease note that the parsing code has a resolution of a minute. So, the last specification would calculate the 5 minutes from the beginning of the current minute, and delay to that absolute point in time. If you need more precision, you can use the first time format, which allows an the delay length to be specified precisely. If delay sees "--" while parsing it's command line, it stops argument processing. Instead, the argument after the "--" is interpreted as a command to be run when delay completes, and any further arguments are used as arguments to that command. For example: delay until 9:30 -- cdplay OPTIONSDelay allows you to use command line options to control aspects of its behavior. Here's a list:
BUGSThe default format is only good for delays of less than 1000 days.Improper use of the -c option can lead to various problems, and may even have some security implications. execvp(2) is used to run the command, and this may run programs in the current directory rather than fully respecting your path. Please see execvp(2) for more details. AUTHORTom Rothamel <tom-delay@onegeek.org>WEB SITEThe delay web site is located at:http://onegeek.org/~tom/software/delay/ SEE ALSOsleep(1), printf(3), at(1)
Visit the GSP FreeBSD Man Page Interface. |