SLEEP(1) General Commands Manual Fully-rendered PDF

sleepdo nothing, slowly

sleep delay[]…

Sleep for the time(s) specified. Each delay is a floating-point amount of seconds, optionally suffixed with one of the following cumulative multipliers:

(econds)
(inutes)
(hours)
(ays)
(eeks)
(ears)
/ 7

Wait a half-second:

sleep 0.5
sleep 1.388e-4h

Wait a year:

sleep 1y
sleep 3.1e+7

Wait infinitely, or until the heat death of the universe:

sleep INF
sleep 10e+100y

nanosleep(2)

Conforms to IEEENoStd1003.1-2024PoDoTn.ENPOSIXNs.1DcPc,whichonlyallowsasinglenon-negativedecimalinteger.Ardelay.Multiple,floating-point.ArdelayNssand.Sysmhdsuffixesareextensions,originatingtheGNUsystem..Sywysuffixesareextensions...ShHISTORY..XrsleepII.PqQqdelayexecutionappearedin.Atv2:.Bl-tag-compact-offset4n-width.Li DESCRIPTION.ItLiNAME.Lisleep -- stop execution for interval.ItLiSYNOPSIS.Li(60ths of a second in r0).br.Lisys sleep / sleep = 35.; not in assembler.ElWiththe.SxBUGSnotingaccuracy.ie0.Sy256Ns/NsSy60Ns=NsSy4.2(6).el%25660=4.2(6)%seconds,andtheprocessbeingalsoplacedonalow-priorityqueueforthedurationofthesleep...Pp.Atv3.XrsleepIItakeswholeseconds,buttheprecisionlimitationsremain..Pp.Atv4seesfull-range.XrsleepII,and.XrsleepIsuspend execution for an interval,limited.Sy65536.Pq16bits,Vtunsigned,Nobutit'smorelikelyactuallySy32767,Vtseconds.PqthisisnotedintheSxBUGS,Nodespitebeingentirelyexpectedwitha16-bitVar0Noona16-bitmachine..Pp.Atv7replaces.XrsleepIIwith.Xrftime2andimplements.Xrsleep3,basedon.Xralarm2,.Xrpause2,and.Xrlongjmp3,in.Lblibc,butleaves.Nmunchanged..Pp.At32vjustblindlyupdatesthe.SxBUGSsaythatthemaxis.Sy2147483647seconds.Consideringthisisnow68.Emyears,ratherthanthe18ishhours(or,indeed,9ish,asthecasemaybe),thisraisesquestionaboutthefore-seenuse-cases..PpThis.Nmimplementationpersistsinto.Atandthe.Bx(but.Atv3and.Bx4.2coolitonthe.Xrlongjmp3Nssin.Xrsleep3),andisstandardisedverbatimin.St-xpg2...EQ

July 19, 2024 voreutils 5a9f9f29