home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / share / emacs / 19.34 / lisp / timer.elc.z / timer.elc
Emacs Compiled Lisp  |  1998-10-28  |  9.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6d 73 40 6d 6f 6c |piled by| rms@mol|
|00000020| 65 2e 67 6e 75 2e 61 69 | 2e 6d 69 74 2e 65 64 75 |e.gnu.ai|.mit.edu|
|00000030| 20 6f 6e 20 54 68 75 20 | 41 70 72 20 20 34 20 31 | on Thu |Apr 4 1|
|00000040| 31 3a 35 35 3a 31 32 20 | 31 39 39 36 0a 3b 3b 3b |1:55:12 |1996.;;;|
|00000050| 20 66 72 6f 6d 20 66 69 | 6c 65 20 2f 67 64 2f 67 | from fi|le /gd/g|
|00000060| 6e 75 2f 65 6d 61 63 73 | 2f 31 39 2e 30 2f 6c 69 |nu/emacs|/19.0/li|
|00000070| 73 70 2f 74 69 6d 65 72 | 2e 65 6c 0a 3b 3b 3b 20 |sp/timer|.el.;;; |
|00000080| 65 6d 61 63 73 20 76 65 | 72 73 69 6f 6e 20 31 39 |emacs ve|rsion 19|
|00000090| 2e 33 30 2e 39 35 2e 31 | 2e 0a 3b 3b 3b 20 62 79 |.30.95.1|..;;; by|
|000000a0| 74 65 63 6f 6d 70 20 76 | 65 72 73 69 6f 6e 20 46 |tecomp v|ersion F|
|000000b0| 53 46 20 32 2e 31 30 0a | 3b 3b 3b 20 6f 70 74 69 |SF 2.10.|;;; opti|
|000000c0| 6d 69 7a 61 74 69 6f 6e | 20 69 73 20 6f 6e 2e 0a |mization| is on..|
|000000d0| 3b 3b 3b 20 74 68 69 73 | 20 66 69 6c 65 20 75 73 |;;; this| file us|
|000000e0| 65 73 20 6f 70 63 6f 64 | 65 73 20 77 68 69 63 68 |es opcod|es which|
|000000f0| 20 64 6f 20 6e 6f 74 20 | 65 78 69 73 74 20 69 6e | do not |exist in|
|00000100| 20 45 6d 61 63 73 20 31 | 38 2e 0a 0a 28 69 66 20 | Emacs 1|8...(if |
|00000110| 28 61 6e 64 20 28 62 6f | 75 6e 64 70 20 27 65 6d |(and (bo|undp 'em|
|00000120| 61 63 73 2d 76 65 72 73 | 69 6f 6e 29 0a 09 20 28 |acs-vers|ion).. (|
|00000130| 6f 72 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |or (and |(boundp |
|00000140| 27 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 |'epoch::|version)|
|00000150| 20 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 | epoch::|version)|
|00000160| 0a 09 20 20 20 20 20 28 | 73 74 72 69 6e 67 2d 6c |.. (|string-l|
|00000170| 65 73 73 70 20 65 6d 61 | 63 73 2d 76 65 72 73 69 |essp ema|cs-versi|
|00000180| 6f 6e 20 22 31 39 2e 32 | 39 22 29 29 29 0a 20 20 |on "19.2|9"))). |
|00000190| 20 20 28 65 72 72 6f 72 | 20 22 60 74 69 6d 65 72 | (error| "`timer|
|000001a0| 2e 65 6c 27 20 77 61 73 | 20 63 6f 6d 70 69 6c 65 |.el' was| compile|
|000001b0| 64 20 66 6f 72 20 45 6d | 61 63 73 20 31 39 2e 32 |d for Em|acs 19.2|
|000001c0| 39 20 6f 72 20 6c 61 74 | 65 72 22 29 29 0a 0a 0a |9 or lat|er"))...|
|000001d0| 23 40 32 34 20 43 72 65 | 61 74 65 20 61 20 74 69 |#@24 Cre|ate a ti|
|000001e0| 6d 65 72 20 6f 62 6a 65 | 63 74 2e 1f 0a 28 64 65 |mer obje|ct...(de|
|000001f0| 66 61 6c 69 61 73 20 27 | 74 69 6d 65 72 2d 63 72 |falias '|timer-cr|
|00000200| 65 61 74 65 20 23 5b 6e | 69 6c 20 22 c0 c1 c2 5c |eate #[n|il "...\|
|00000210| 22 89 1b c4 c5 49 88 0b | 29 87 22 20 5b 6d 61 6b |"....I..|)." [mak|
|00000220| 65 2d 76 65 63 74 6f 72 | 20 38 20 6e 69 6c 20 74 |e-vector| 8 nil t|
|00000230| 69 6d 65 72 20 30 20 74 | 5d 20 34 20 28 23 24 20 |imer 0 t|] 4 (#$ |
|00000240| 2e 20 34 36 39 29 5d 29 | 0a 23 40 33 32 20 52 65 |. 469)])|.#@32 Re|
|00000250| 74 75 72 6e 20 74 20 69 | 66 20 4f 42 4a 45 43 54 |turn t i|f OBJECT|
|00000260| 20 69 73 20 61 20 74 69 | 6d 65 72 2e 1f 0a 28 64 | is a ti|mer...(d|
|00000270| 65 66 61 6c 69 61 73 20 | 27 74 69 6d 65 72 70 20 |efalias |'timerp |
|00000280| 23 5b 28 6f 62 6a 65 63 | 74 29 20 22 c0 09 21 85 |#[(objec|t) "..!.|
|00000290| 5c 6e 00 09 47 c2 55 87 | 22 20 5b 76 65 63 74 6f |\n..G.U.|" [vecto|
|000002a0| 72 70 20 6f 62 6a 65 63 | 74 20 38 5d 20 32 20 28 |rp objec|t 8] 2 (|
|000002b0| 23 24 20 2e 20 35 39 30 | 29 5d 29 0a 23 40 32 32 |#$ . 590|)]).#@22|
|000002c0| 33 20 53 65 74 20 74 68 | 65 20 74 72 69 67 67 65 |3 Set th|e trigge|
|000002d0| 72 20 74 69 6d 65 20 6f | 66 20 54 49 4d 45 52 20 |r time o|f TIMER |
|000002e0| 74 6f 20 54 49 4d 45 2e | 0a 54 49 4d 45 20 6d 75 |to TIME.|.TIME mu|
|000002f0| 73 74 20 62 65 20 69 6e | 20 74 68 65 20 69 6e 74 |st be in| the int|
|00000300| 65 72 6e 61 6c 20 66 6f | 72 6d 61 74 20 72 65 74 |ernal fo|rmat ret|
|00000310| 75 72 6e 65 64 20 62 79 | 2c 20 65 2e 67 2e 2c 20 |urned by|, e.g., |
|00000320| 60 63 75 72 72 65 6e 74 | 2d 74 69 6d 65 27 2e 0a |`current|-time'..|
|00000330| 49 66 20 6f 70 74 69 6f | 6e 61 6c 20 74 68 69 72 |If optio|nal thir|
|00000340| 64 20 61 72 67 75 6d 65 | 6e 74 20 44 45 4c 54 41 |d argume|nt DELTA|
|00000350| 20 69 73 20 61 20 6e 6f | 6e 2d 7a 65 72 6f 20 69 | is a no|n-zero i|
|00000360| 6e 74 65 67 65 72 2c 20 | 6d 61 6b 65 20 74 68 65 |nteger, |make the|
|00000370| 20 74 69 6d 65 72 0a 66 | 69 72 65 20 72 65 70 65 | timer.f|ire repe|
|00000380| 61 74 65 64 6c 79 20 74 | 68 61 74 20 6d 61 6e 79 |atedly t|hat many|
|00000390| 20 73 65 63 6f 6e 64 73 | 20 61 70 61 72 74 2e 1f | seconds| apart..|
|000003a0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 74 69 6d 65 |.(defali|as 'time|
|000003b0| 72 2d 73 65 74 2d 74 69 | 6d 65 20 23 5b 28 74 69 |r-set-ti|me #[(ti|
|000003c0| 6d 65 72 20 74 69 6d 65 | 20 26 6f 70 74 69 6f 6e |mer time| &option|
|000003d0| 61 6c 20 64 65 6c 74 61 | 29 20 22 c0 09 21 84 5c |al delta|) "..!.\|
|000003e0| 6e 00 c2 c3 21 88 09 c4 | 0d 40 49 88 09 c6 0d 41 |n...!...|.@I....A|
|000003f0| 3a 83 1e 00 0d 41 40 82 | 20 00 0d 41 49 88 09 c7 |:....A@.| ..AI...|
|00000400| 0d 41 3a 83 37 00 0d 41 | 41 3a 83 37 00 c6 0d 38 |.A:.7..A|A:.7...8|
|00000410| 86 38 00 c8 49 88 09 c9 | 0e 5c 6e a7 85 4b 00 0e |.8..I...|.\n..K..|
|00000420| 5c 6e c8 56 85 4b 00 0e | 5c 6e 49 88 09 87 22 20 |\n.V.K..|\nI..." |
|00000430| 5b 74 69 6d 65 72 70 20 | 74 69 6d 65 72 20 65 72 |[timerp |timer er|
|00000440| 72 6f 72 20 22 49 6e 76 | 61 6c 69 64 20 74 69 6d |ror "Inv|alid tim|
|00000450| 65 72 22 20 31 20 74 69 | 6d 65 20 32 20 33 20 30 |er" 1 ti|me 2 3 0|
|00000460| 20 34 20 64 65 6c 74 61 | 5d 20 34 20 28 23 24 20 | 4 delta|] 4 (#$ |
|00000470| 2e 20 37 30 36 29 5d 29 | 0a 23 40 31 35 38 20 53 |. 706)])|.#@158 S|
|00000480| 65 74 20 74 68 65 20 74 | 72 69 67 67 65 72 20 69 |et the t|rigger i|
|00000490| 64 6c 65 20 74 69 6d 65 | 20 6f 66 20 54 49 4d 45 |dle time| of TIME|
|000004a0| 52 20 74 6f 20 53 45 43 | 53 2e 0a 49 66 20 6f 70 |R to SEC|S..If op|
|000004b0| 74 69 6f 6e 61 6c 20 74 | 68 69 72 64 20 61 72 67 |tional t|hird arg|
|000004c0| 75 6d 65 6e 74 20 52 45 | 50 45 41 54 20 69 73 20 |ument RE|PEAT is |
|000004d0| 6e 6f 6e 2d 6e 69 6c 2c | 20 6d 61 6b 65 20 74 68 |non-nil,| make th|
|000004e0| 65 20 74 69 6d 65 72 0a | 66 69 72 65 20 65 61 63 |e timer.|fire eac|
|000004f0| 68 20 74 69 6d 65 20 45 | 6d 61 63 73 20 69 73 20 |h time E|macs is |
|00000500| 69 64 6c 65 20 66 6f 72 | 20 74 68 61 74 20 6d 61 |idle for| that ma|
|00000510| 6e 79 20 73 65 63 6f 6e | 64 73 2e 1f 0a 28 64 65 |ny secon|ds...(de|
|00000520| 66 61 6c 69 61 73 20 27 | 74 69 6d 65 72 2d 73 65 |falias '|timer-se|
|00000530| 74 2d 69 64 6c 65 2d 74 | 69 6d 65 20 23 5b 28 74 |t-idle-t|ime #[(t|
|00000540| 69 6d 65 72 20 73 65 63 | 73 20 26 6f 70 74 69 6f |imer sec|s &optio|
|00000550| 6e 61 6c 20 72 65 70 65 | 61 74 29 20 22 c0 09 21 |nal repe|at) "..!|
|00000560| 84 5c 6e 00 c2 c3 21 88 | 09 c4 c5 49 88 09 c6 c5 |.\n...!.|...I....|
|00000570| 49 88 09 c7 c5 49 88 c8 | 09 0e 09 5c 22 88 09 ca |I....I..|...\"...|
|00000580| 0e 0b 49 88 09 87 22 20 | 5b 74 69 6d 65 72 70 20 |..I..." |[timerp |
|00000590| 74 69 6d 65 72 20 65 72 | 72 6f 72 20 22 49 6e 76 |timer er|ror "Inv|
|000005a0| 61 6c 69 64 20 74 69 6d | 65 72 22 20 31 20 30 20 |alid tim|er" 1 0 |
|000005b0| 32 20 33 20 74 69 6d 65 | 72 2d 69 6e 63 2d 74 69 |2 3 time|r-inc-ti|
|000005c0| 6d 65 20 73 65 63 73 20 | 34 20 72 65 70 65 61 74 |me secs |4 repeat|
|000005d0| 5d 20 33 20 28 23 24 20 | 2e 20 31 31 35 31 29 5d |] 3 (#$ |. 1151)]|
|000005e0| 29 0a 23 40 38 39 20 41 | 64 76 61 6e 63 65 20 54 |).#@89 A|dvance T|
|000005f0| 49 4d 45 20 62 79 20 53 | 45 43 53 20 73 65 63 6f |IME by S|ECS seco|
|00000600| 6e 64 73 20 61 6e 64 20 | 6f 70 74 69 6f 6e 61 6c |nds and |optional|
|00000610| 6c 79 20 55 53 45 43 53 | 20 6d 69 63 72 6f 73 65 |ly USECS| microse|
|00000620| 63 6f 6e 64 73 2e 0a 53 | 45 43 53 20 6d 61 79 20 |conds..S|ECS may |
|00000630| 62 65 20 61 20 66 72 61 | 63 74 69 6f 6e 2e 1f 0a |be a fra|ction...|
|00000640| 28 64 65 66 61 6c 69 61 | 73 20 27 74 69 6d 65 72 |(defalia|s 'timer|
|00000650| 2d 72 65 6c 61 74 69 76 | 65 2d 74 69 6d 65 20 23 |-relativ|e-time #|
|00000660| 5b 28 74 69 6d 65 20 73 | 65 63 73 20 26 6f 70 74 |[(time s|ecs &opt|
|00000670| 69 6f 6e 61 6c 20 75 73 | 65 63 73 29 20 22 08 40 |ional us|ecs) ".@|
|00000680| 08 41 3a 83 0e 00 08 41 | 40 82 10 00 08 41 08 41 |.A:....A|@....A.A|
|00000690| a3 a2 a7 83 1e 00 c1 08 | 38 82 1f 00 c2 1b 1c 1d |........|8.......|
|000006a0| 0e 06 83 2c 00 0b 0e 06 | 5c 5c 13 c7 0e 08 21 83 |...,....|\\....!.|
|000006b0| 41 00 0b c9 0e 08 c9 0e | 08 21 5a ca 5f 21 5c 5c |A.......|.!Z._!\\|
|000006c0| 13 5c 66 c9 0e 08 21 5c | 5c 89 14 0b ca a5 5c 5c |.\f...!\|\.....\\|
|000006d0| 14 cb 0b ca 5c 22 13 0d | 5c 66 cc a5 5c 5c 15 cd |....\"..|\f..\\..|
|000006e0| 5c 66 ce 5c 22 14 0d 5c | 66 0b c2 55 3f 85 68 00 |\f.\"..\|f..U?.h.|
|000006f0| 0b 45 2b 87 22 20 5b 74 | 69 6d 65 20 32 20 30 20 |.E+." [t|ime 2 0 |
|00000700| 6d 69 63 72 6f 20 6c 6f | 77 20 68 69 67 68 20 75 |micro lo|w high u|
|00000710| 73 65 63 73 20 66 6c 6f | 61 74 70 20 73 65 63 73 |secs flo|atp secs|
|00000720| 20 66 6c 6f 6f 72 20 31 | 30 30 30 30 30 30 20 6d | floor 1|000000 m|
|00000730| 6f 64 20 36 35 35 33 36 | 20 6c 6f 67 61 6e 64 20 |od 65536| logand |
|00000740| 36 35 35 33 35 5d 20 36 | 20 28 23 24 20 2e 20 31 |65535] 6| (#$ . 1|
|00000750| 35 31 31 29 5d 29 0a 23 | 40 39 37 20 49 6e 63 72 |511)]).#|@97 Incr|
|00000760| 65 6d 65 6e 74 20 74 68 | 65 20 74 69 6d 65 20 73 |ement th|e time s|
|00000770| 65 74 20 69 6e 20 54 49 | 4d 45 52 20 62 79 20 53 |et in TI|MER by S|
|00000780| 45 43 53 20 73 65 63 6f | 6e 64 73 20 61 6e 64 20 |ECS seco|nds and |
|00000790| 55 53 45 43 53 20 6d 69 | 63 72 6f 73 65 63 6f 6e |USECS mi|crosecon|
|000007a0| 64 73 2e 0a 53 45 43 53 | 20 6d 61 79 20 62 65 20 |ds..SECS| may be |
|000007b0| 61 20 66 72 61 63 74 69 | 6f 6e 2e 1f 0a 28 64 65 |a fracti|on...(de|
|000007c0| 66 61 6c 69 61 73 20 27 | 74 69 6d 65 72 2d 69 6e |falias '|timer-in|
|000007d0| 63 2d 74 69 6d 65 20 23 | 5b 28 74 69 6d 65 72 20 |c-time #|[(timer |
|000007e0| 73 65 63 73 20 26 6f 70 | 74 69 6f 6e 61 6c 20 75 |secs &op|tional u|
|000007f0| 73 65 63 73 29 20 22 c0 | 09 c2 48 09 c3 48 09 c4 |secs) ".|..H..H..|
|00000800| 48 45 0d 0e 06 23 1e 07 | 09 c2 0e 07 40 49 88 09 |HE...#..|....@I..|
|00000810| c3 0e 07 41 40 49 88 09 | c4 c3 0e 07 38 86 2a 00 |...A@I..|....8.*.|
|00000820| c8 49 29 87 22 20 5b 74 | 69 6d 65 72 2d 72 65 6c |.I)." [t|imer-rel|
|00000830| 61 74 69 76 65 2d 74 69 | 6d 65 20 74 69 6d 65 72 |ative-ti|me timer|
|00000840| 20 31 20 32 20 33 20 73 | 65 63 73 20 75 73 65 63 | 1 2 3 s|ecs usec|
|00000850| 73 20 74 69 6d 65 20 30 | 5d 20 35 20 28 23 24 20 |s time 0|] 5 (#$ |
|00000860| 2e 20 31 38 38 34 29 5d | 29 0a 23 40 32 32 33 20 |. 1884)]|).#@223 |
|00000870| 53 65 74 20 74 68 65 20 | 74 72 69 67 67 65 72 20 |Set the |trigger |
|00000880| 74 69 6d 65 20 6f 66 20 | 54 49 4d 45 52 20 74 6f |time of |TIMER to|
|00000890| 20 54 49 4d 45 2e 0a 54 | 49 4d 45 20 6d 75 73 74 | TIME..T|IME must|
|000008a0| 20 62 65 20 69 6e 20 74 | 68 65 20 69 6e 74 65 72 | be in t|he inter|
|000008b0| 6e 61 6c 20 66 6f 72 6d | 61 74 20 72 65 74 75 72 |nal form|at retur|
|000008c0| 6e 65 64 20 62 79 2c 20 | 65 2e 67 2e 2c 20 60 63 |ned by, |e.g., `c|
|000008d0| 75 72 72 65 6e 74 2d 74 | 69 6d 65 27 2e 0a 49 66 |urrent-t|ime'..If|
|000008e0| 20 6f 70 74 69 6f 6e 61 | 6c 20 74 68 69 72 64 20 | optiona|l third |
|000008f0| 61 72 67 75 6d 65 6e 74 | 20 44 45 4c 54 41 20 69 |argument| DELTA i|
|00000900| 73 20 61 20 6e 6f 6e 2d | 7a 65 72 6f 20 69 6e 74 |s a non-|zero int|
|00000910| 65 67 65 72 2c 20 6d 61 | 6b 65 20 74 68 65 20 74 |eger, ma|ke the t|
|00000920| 69 6d 65 72 0a 66 69 72 | 65 20 72 65 70 65 61 74 |imer.fir|e repeat|
|00000930| 65 64 6c 79 20 74 68 61 | 74 20 6d 61 6e 79 20 73 |edly tha|t many s|
|00000940| 65 63 6f 6e 64 73 20 61 | 70 61 72 74 2e 1f 0a 28 |econds a|part...(|
|00000950| 64 65 66 61 6c 69 61 73 | 20 27 74 69 6d 65 72 2d |defalias| 'timer-|
|00000960| 73 65 74 2d 74 69 6d 65 | 2d 77 69 74 68 2d 75 73 |set-time|-with-us|
|00000970| 65 63 73 20 23 5b 28 74 | 69 6d 65 72 20 74 69 6d |ecs #[(t|imer tim|
|00000980| 65 20 75 73 65 63 73 20 | 26 6f 70 74 69 6f 6e 61 |e usecs |&optiona|
|00000990| 6c 20 64 65 6c 74 61 29 | 20 22 c0 09 21 84 5c 6e |l delta)| "..!.\n|
|000009a0| 00 c2 c3 21 88 09 c4 0d | 40 49 88 09 c6 0d 41 3a |...!....|@I....A:|
|000009b0| 83 1e 00 0d 41 40 82 20 | 00 0d 41 49 88 09 c7 0e |....A@. |..AI....|
|000009c0| 08 49 88 09 c9 0e 5c 6e | a7 85 39 00 0e 5c 6e cb |.I....\n|..9..\n.|
|000009d0| 56 85 39 00 0e 5c 6e 49 | 88 09 87 22 20 5b 74 69 |V.9..\nI|..." [ti|
|000009e0| 6d 65 72 70 20 74 69 6d | 65 72 20 65 72 72 6f 72 |merp tim|er error|
|000009f0| 20 22 49 6e 76 61 6c 69 | 64 20 74 69 6d 65 72 22 | "Invali|d timer"|
|00000a00| 20 31 20 74 69 6d 65 20 | 32 20 33 20 75 73 65 63 | 1 time |2 3 usec|
|00000a10| 73 20 34 20 64 65 6c 74 | 61 20 30 5d 20 34 20 28 |s 4 delt|a 0] 4 (|
|00000a20| 23 24 20 2e 20 32 31 36 | 30 29 5d 29 0a 23 40 36 |#$ . 216|0)]).#@6|
|00000a30| 32 20 4d 61 6b 65 20 54 | 49 4d 45 52 20 63 61 6c |2 Make T|IMER cal|
|00000a40| 6c 20 46 55 4e 43 54 49 | 4f 4e 20 77 69 74 68 20 |l FUNCTI|ON with |
|00000a50| 6f 70 74 69 6f 6e 61 6c | 20 41 52 47 53 20 77 68 |optional| ARGS wh|
|00000a60| 65 6e 20 74 72 69 67 67 | 65 72 69 6e 67 2e 1f 0a |en trigg|ering...|
|00000a70| 28 64 65 66 61 6c 69 61 | 73 20 27 74 69 6d 65 72 |(defalia|s 'timer|
|00000a80| 2d 73 65 74 2d 66 75 6e | 63 74 69 6f 6e 20 23 5b |-set-fun|ction #[|
|00000a90| 28 74 69 6d 65 72 20 66 | 75 6e 63 74 69 6f 6e 20 |(timer f|unction |
|00000aa0| 26 6f 70 74 69 6f 6e 61 | 6c 20 61 72 67 73 29 20 |&optiona|l args) |
|00000ab0| 22 c0 09 21 84 5c 6e 00 | c2 c3 21 88 09 c4 0d 49 |"..!.\n.|..!....I|
|00000ac0| 88 09 c6 0e 07 49 88 09 | 87 22 20 5b 74 69 6d 65 |.....I..|." [time|
|00000ad0| 72 70 20 74 69 6d 65 72 | 20 65 72 72 6f 72 20 22 |rp timer| error "|
|00000ae0| 49 6e 76 61 6c 69 64 20 | 74 69 6d 65 72 22 20 35 |Invalid |timer" 5|
|00000af0| 20 66 75 6e 63 74 69 6f | 6e 20 36 20 61 72 67 73 | functio|n 6 args|
|00000b00| 5d 20 33 20 28 23 24 20 | 2e 20 32 36 31 30 29 5d |] 3 (#$ |. 2610)]|
|00000b10| 29 0a 23 40 34 31 20 50 | 75 74 20 54 49 4d 45 52 |).#@41 P|ut TIMER|
|00000b20| 20 6f 6e 20 74 68 65 20 | 6c 69 73 74 20 6f 66 20 | on the |list of |
|00000b30| 61 63 74 69 76 65 20 74 | 69 6d 65 72 73 2e 1f 0a |active t|imers...|
|00000b40| 28 64 65 66 61 6c 69 61 | 73 20 27 74 69 6d 65 72 |(defalia|s 'timer|
|00000b50| 2d 61 63 74 69 76 61 74 | 65 20 23 5b 28 74 69 6d |-activat|e #[(tim|
|00000b60| 65 72 29 20 22 c0 09 21 | 83 a4 00 09 c2 48 a8 83 |er) "..!|.....H..|
|00000b70| a4 00 09 c3 48 a8 83 a4 | 00 09 c4 48 a8 83 a4 00 |....H...|...H....|
|00000b80| 09 c5 48 83 a4 00 0e 06 | c7 1e 08 89 1e 09 83 81 |..H.....|........|
|00000b90| 00 09 c2 48 0e 09 40 c2 | 48 56 84 74 00 09 c2 48 |...H..@.|HV.t...H|
|00000ba0| 0e 09 40 c2 48 55 83 50 | 00 09 c3 48 0e 09 40 c3 |..@.HU.P|...H..@.|
|00000bb0| 48 56 84 74 00 09 c2 48 | 0e 09 40 c2 48 55 83 81 |HV.t...H|..@.HU..|
|00000bc0| 00 09 c3 48 0e 09 40 c3 | 48 55 83 81 00 09 c4 48 |...H..@.|HU.....H|
|00000bd0| 0e 09 40 c4 48 56 83 81 | 00 0e 09 16 08 0e 09 41 |..@.HV..|.......A|
|00000be0| 89 16 09 84 2c 00 0e 08 | 83 91 00 0e 08 09 0e 09 |....,...|........|
|00000bf0| 42 a1 88 82 97 00 09 0e | 09 42 16 06 09 ca c7 49 |B.......|.B.....I|
|00000c00| 88 09 cb c7 49 88 2a c7 | 87 cc cd 21 87 22 20 5b |....I.*.|...!." [|
|00000c10| 74 69 6d 65 72 70 20 74 | 69 6d 65 72 20 31 20 32 |timerp t|imer 1 2|
|00000c20| 20 33 20 35 20 74 69 6d | 65 72 2d 6c 69 73 74 20 | 3 5 tim|er-list |
|00000c30| 6e 69 6c 20 6c 61 73 74 | 20 74 69 6d 65 72 73 20 |nil last| timers |
|00000c40| 30 20 37 20 65 72 72 6f | 72 20 22 49 6e 76 61 6c |0 7 erro|r "Inval|
|00000c50| 69 64 20 6f 72 20 75 6e | 69 6e 69 74 69 61 6c 69 |id or un|initiali|
|00000c60| 7a 65 64 20 74 69 6d 65 | 72 22 5d 20 34 20 28 23 |zed time|r"] 4 (#|
|00000c70| 24 20 2e 20 32 38 33 39 | 29 5d 29 0a 23 40 35 36 |$ . 2839|)]).#@56|
|00000c80| 20 41 72 72 61 6e 67 65 | 20 74 6f 20 61 63 74 69 | Arrange| to acti|
|00000c90| 76 61 74 65 20 54 49 4d | 45 52 20 77 68 65 6e 65 |vate TIM|ER whene|
|00000ca0| 76 65 72 20 45 6d 61 63 | 73 20 69 73 20 6e 65 78 |ver Emac|s is nex|
|00000cb0| 74 20 69 64 6c 65 2e 1f | 0a 28 64 65 66 61 6c 69 |t idle..|.(defali|
|00000cc0| 61 73 20 27 74 69 6d 65 | 72 2d 61 63 74 69 76 61 |as 'time|r-activa|
|00000cd0| 74 65 2d 77 68 65 6e 2d | 69 64 6c 65 20 23 5b 28 |te-when-|idle #[(|
|00000ce0| 74 69 6d 65 72 29 20 22 | c0 09 21 83 a4 00 09 c2 |timer) "|..!.....|
|00000cf0| 48 a8 83 a4 00 09 c3 48 | a8 83 a4 00 09 c4 48 a8 |H......H|......H.|
|00000d00| 83 a4 00 09 c5 48 83 a4 | 00 0e 06 c7 1e 08 89 1e |.....H..|........|
|00000d10| 09 83 81 00 09 c2 48 0e | 09 40 c2 48 56 84 74 00 |......H.|.@.HV.t.|
|00000d20| 09 c2 48 0e 09 40 c2 48 | 55 83 50 00 09 c3 48 0e |..H..@.H|U.P...H.|
|00000d30| 09 40 c3 48 56 84 74 00 | 09 c2 48 0e 09 40 c2 48 |.@.HV.t.|..H..@.H|
|00000d40| 55 83 81 00 09 c3 48 0e | 09 40 c3 48 55 83 81 00 |U.....H.|.@.HU...|
|00000d50| 09 c4 48 0e 09 40 c4 48 | 56 83 81 00 0e 09 16 08 |..H..@.H|V.......|
|00000d60| 0e 09 41 89 16 09 84 2c | 00 0e 08 83 91 00 0e 08 |..A....,|........|
|00000d70| 09 0e 09 42 a1 88 82 97 | 00 09 0e 09 42 16 06 09 |...B....|....B...|
|00000d80| ca cb 49 88 09 cc cb 49 | 88 2a c7 87 cd ce 21 87 |..I....I|.*....!.|
|00000d90| 22 20 5b 74 69 6d 65 72 | 70 20 74 69 6d 65 72 20 |" [timer|p timer |
|00000da0| 31 20 32 20 33 20 35 20 | 74 69 6d 65 72 2d 69 64 |1 2 3 5 |timer-id|
|00000db0| 6c 65 2d 6c 69 73 74 20 | 6e 69 6c 20 6c 61 73 74 |le-list |nil last|
|00000dc0| 20 74 69 6d 65 72 73 20 | 30 20 74 20 37 20 65 72 | timers |0 t 7 er|
|00000dd0| 72 6f 72 20 22 49 6e 76 | 61 6c 69 64 20 6f 72 20 |ror "Inv|alid or |
|00000de0| 75 6e 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 74 69 |uninitia|lized ti|
|00000df0| 6d 65 72 22 5d 20 34 20 | 28 23 24 20 2e 20 33 32 |mer"] 4 |(#$ . 32|
|00000e00| 30 31 29 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |01)]).(d|efalias |
|00000e10| 28 71 75 6f 74 65 20 64 | 69 73 61 62 6c 65 2d 74 |(quote d|isable-t|
|00000e20| 69 6d 65 6f 75 74 29 20 | 28 71 75 6f 74 65 20 63 |imeout) |(quote c|
|00000e30| 61 6e 63 65 6c 2d 74 69 | 6d 65 72 29 29 0a 23 40 |ancel-ti|mer)).#@|
|00000e40| 34 36 20 52 65 6d 6f 76 | 65 20 54 49 4d 45 52 20 |46 Remov|e TIMER |
|00000e50| 66 72 6f 6d 20 74 68 65 | 20 6c 69 73 74 20 6f 66 |from the| list of|
|00000e60| 20 61 63 74 69 76 65 20 | 74 69 6d 65 72 73 2e 1f | active |timers..|
|00000e70| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 63 61 6e 63 |.(defali|as 'canc|
|00000e80| 65 6c 2d 74 69 6d 65 72 | 20 23 5b 28 74 69 6d 65 |el-timer| #[(time|
|00000e90| 72 29 20 22 c0 09 21 84 | 5c 6e 00 c2 c3 21 88 c4 |r) "..!.|\n...!..|
|00000ea0| 09 0d 5c 22 15 c4 09 0e | 06 5c 22 16 06 c7 87 22 |..\"....|.\"...."|
|00000eb0| 20 5b 74 69 6d 65 72 70 | 20 74 69 6d 65 72 20 65 | [timerp| timer e|
|00000ec0| 72 72 6f 72 20 22 49 6e | 76 61 6c 69 64 20 74 69 |rror "In|valid ti|
|00000ed0| 6d 65 72 22 20 64 65 6c | 71 20 74 69 6d 65 72 2d |mer" del|q timer-|
|00000ee0| 6c 69 73 74 20 74 69 6d | 65 72 2d 69 64 6c 65 2d |list tim|er-idle-|
|00000ef0| 6c 69 73 74 20 6e 69 6c | 5d 20 33 20 28 23 24 20 |list nil|] 3 (#$ |
|00000f00| 2e 20 33 36 35 31 29 5d | 29 0a 23 40 37 32 20 43 |. 3651)]|).#@72 C|
|00000f10| 61 6e 63 65 6c 20 61 6c | 6c 20 74 69 6d 65 72 73 |ancel al|l timers|
|00000f20| 20 73 63 68 65 64 75 6c | 65 64 20 62 79 20 60 72 | schedul|ed by `r|
|00000f30| 75 6e 2d 61 74 2d 74 69 | 6d 65 27 20 77 68 69 63 |un-at-ti|me' whic|
|00000f40| 68 20 77 6f 75 6c 64 20 | 72 75 6e 20 46 55 4e 43 |h would |run FUNC|
|00000f50| 54 49 4f 4e 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |TION...(|defalias|
|00000f60| 20 27 63 61 6e 63 65 6c | 2d 66 75 6e 63 74 69 6f | 'cancel|-functio|
|00000f70| 6e 2d 74 69 6d 65 72 73 | 20 23 5b 28 66 75 6e 63 |n-timers| #[(func|
|00000f80| 74 69 6f 6e 29 20 22 08 | 89 19 83 1c 00 09 40 c2 |tion) ".|......@.|
|00000f90| 48 0b 3d 83 15 00 c4 09 | 40 08 5c 22 10 09 41 89 |H.=.....|@.\"..A.|
|00000fa0| 11 84 06 00 29 0d 89 19 | 85 3a 00 09 40 c2 48 0b |....)...|.:..@.H.|
|00000fb0| 3d 83 32 00 c4 09 40 0d | 5c 22 15 09 41 89 11 84 |=.2...@.|\"..A...|
|00000fc0| 23 00 c6 29 87 22 20 5b | 74 69 6d 65 72 2d 6c 69 |#..)." [|timer-li|
|00000fd0| 73 74 20 74 61 69 6c 20 | 35 20 66 75 6e 63 74 69 |st tail |5 functi|
|00000fe0| 6f 6e 20 64 65 6c 71 20 | 74 69 6d 65 72 2d 69 64 |on delq |timer-id|
|00000ff0| 6c 65 2d 6c 69 73 74 20 | 6e 69 6c 5d 20 34 20 28 |le-list |nil] 4 (|
|00001000| 23 24 20 2e 20 33 38 35 | 35 29 20 22 61 43 61 6e |#$ . 385|5) "aCan|
|00001010| 63 65 6c 20 74 69 6d 65 | 72 73 20 6f 66 20 66 75 |cel time|rs of fu|
|00001020| 6e 63 74 69 6f 6e 3a 20 | 22 5d 29 0a 28 62 79 74 |nction: |"]).(byt|
|00001030| 65 2d 63 6f 64 65 20 22 | c0 09 c2 c3 23 88 c4 c5 |e-code "|....#...|
|00001040| 21 84 0e 00 c6 15 c5 0e | 07 42 16 07 c4 c8 21 84 |!.......|.B....!.|
|00001050| 1d 00 c6 16 08 c8 0e 07 | 42 16 07 c4 c9 21 84 2c |........|B....!.,|
|00001060| 00 c6 16 09 c9 0e 07 42 | 16 07 c6 87 22 20 5b 64 |.......B|...." [d|
|00001070| 65 66 69 6e 65 2d 6b 65 | 79 20 73 70 65 63 69 61 |efine-ke|y specia|
|00001080| 6c 2d 65 76 65 6e 74 2d | 6d 61 70 20 5b 74 69 6d |l-event-|map [tim|
|00001090| 65 72 2d 65 76 65 6e 74 | 5d 20 74 69 6d 65 72 2d |er-event|] timer-|
|000010a0| 65 76 65 6e 74 2d 68 61 | 6e 64 6c 65 72 20 62 6f |event-ha|ndler bo|
|000010b0| 75 6e 64 70 20 74 69 6d | 65 72 2d 65 76 65 6e 74 |undp tim|er-event|
|000010c0| 2d 6c 61 73 74 2d 32 20 | 6e 69 6c 20 63 75 72 72 |-last-2 |nil curr|
|000010d0| 65 6e 74 2d 6c 6f 61 64 | 2d 6c 69 73 74 20 74 69 |ent-load|-list ti|
|000010e0| 6d 65 72 2d 65 76 65 6e | 74 2d 6c 61 73 74 2d 31 |mer-even|t-last-1|
|000010f0| 20 74 69 6d 65 72 2d 65 | 76 65 6e 74 2d 6c 61 73 | timer-e|vent-las|
|00001100| 74 5d 20 34 29 0a 23 40 | 35 32 20 43 61 6c 6c 20 |t] 4).#@|52 Call |
|00001110| 74 68 65 20 68 61 6e 64 | 6c 65 72 20 66 6f 72 20 |the hand|ler for |
|00001120| 74 68 65 20 74 69 6d 65 | 72 20 69 6e 20 74 68 65 |the time|r in the|
|00001130| 20 65 76 65 6e 74 20 45 | 56 45 4e 54 2e 1f 0a 28 | event E|VENT...(|
|00001140| 64 65 66 61 6c 69 61 73 | 20 27 74 69 6d 65 72 2d |defalias| 'timer-|
|00001150| 65 76 65 6e 74 2d 68 61 | 6e 64 6c 65 72 20 23 5b |event-ha|ndler #[|
|00001160| 28 65 76 65 6e 74 29 20 | 22 08 11 5c 6e 10 0b c4 |(event) |"..\n...|
|00001170| 0b 21 42 12 c5 0b a3 a2 | 1e 06 1e 07 c8 0e 06 21 |.!B.....|.......!|
|00001180| 83 48 00 c9 0e 06 21 88 | ca cb cc 8f 88 0e 06 cd |.H....!.|........|
|00001190| 48 85 4b 00 0e 06 ce 48 | 83 38 00 cf 0e 06 21 82 |H.K....H|.8....!.|
|000011a0| 4b 00 d0 0e 06 89 cd 48 | d1 23 88 d2 0e 06 21 82 |K......H|.#....!.|
|000011b0| 4b 00 d3 d4 21 2a 87 22 | 20 5b 74 69 6d 65 72 2d |K...!*."| [timer-|
|000011c0| 65 76 65 6e 74 2d 6c 61 | 73 74 2d 31 20 74 69 6d |event-la|st-1 tim|
|000011d0| 65 72 2d 65 76 65 6e 74 | 2d 6c 61 73 74 2d 32 20 |er-event|-last-2 |
|000011e0| 74 69 6d 65 72 2d 65 76 | 65 6e 74 2d 6c 61 73 74 |timer-ev|ent-last|
|000011f0| 20 65 76 65 6e 74 20 63 | 6f 70 79 2d 73 65 71 75 | event c|opy-sequ|
|00001200| 65 6e 63 65 20 74 20 74 | 69 6d 65 72 20 69 6e 68 |ence t t|imer inh|
|00001210| 69 62 69 74 2d 71 75 69 | 74 20 74 69 6d 65 72 70 |ibit-qui|t timerp|
|00001220| 20 63 61 6e 63 65 6c 2d | 74 69 6d 65 72 20 6e 69 | cancel-|timer ni|
|00001230| 6c 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 09 |l (byte-|code "..|
|00001240| c2 48 09 c3 48 5c 22 87 | 22 20 5b 61 70 70 6c 79 |.H..H\".|" [apply|
|00001250| 20 74 69 6d 65 72 20 35 | 20 36 5d 20 34 29 20 28 | timer 5| 6] 4) (|
|00001260| 28 65 72 72 6f 72 29 29 | 20 34 20 37 20 74 69 6d |(error))| 4 7 tim|
|00001270| 65 72 2d 61 63 74 69 76 | 61 74 65 2d 77 68 65 6e |er-activ|ate-when|
|00001280| 2d 69 64 6c 65 20 74 69 | 6d 65 72 2d 69 6e 63 2d |-idle ti|mer-inc-|
|00001290| 74 69 6d 65 20 30 20 74 | 69 6d 65 72 2d 61 63 74 |time 0 t|imer-act|
|000012a0| 69 76 61 74 65 20 65 72 | 72 6f 72 20 22 42 6f 67 |ivate er|ror "Bog|
|000012b0| 75 73 20 74 69 6d 65 72 | 20 65 76 65 6e 74 22 5d |us timer| event"]|
|000012c0| 20 34 20 28 23 24 20 2e | 20 34 33 36 33 29 20 22 | 4 (#$ .| 4363) "|
|000012d0| 65 22 5d 29 0a 23 40 33 | 38 20 4e 6f 6e 2d 6e 69 |e"]).#@3|8 Non-ni|
|000012e0| 6c 20 69 66 20 45 56 45 | 4e 54 20 69 73 20 61 20 |l if EVE|NT is a |
|000012f0| 74 69 6d 65 6f 75 74 20 | 65 76 65 6e 74 2e 1f 0a |timeout |event...|
|00001300| 28 64 65 66 61 6c 69 61 | 73 20 27 74 69 6d 65 6f |(defalia|s 'timeo|
|00001310| 75 74 2d 65 76 65 6e 74 | 2d 70 20 23 5b 28 65 76 |ut-event|-p #[(ev|
|00001320| 65 6e 74 29 20 22 08 3c | 85 09 00 08 40 c1 3d 87 |ent) ".<|....@.=.|
|00001330| 22 20 5b 65 76 65 6e 74 | 20 74 69 6d 65 72 2d 65 |" [event| timer-e|
|00001340| 76 65 6e 74 5d 20 32 20 | 28 23 24 20 2e 20 34 38 |vent] 2 |(#$ . 48|
|00001350| 32 36 29 5d 29 0a 23 40 | 34 30 38 20 50 65 72 66 |26)]).#@|408 Perf|
|00001360| 6f 72 6d 20 61 6e 20 61 | 63 74 69 6f 6e 20 61 66 |orm an a|ction af|
|00001370| 74 65 72 20 61 20 64 65 | 6c 61 79 20 6f 66 20 53 |ter a de|lay of S|
|00001380| 45 43 53 20 73 65 63 6f | 6e 64 73 2e 0a 52 65 70 |ECS seco|nds..Rep|
|00001390| 65 61 74 20 74 68 65 20 | 61 63 74 69 6f 6e 20 65 |eat the |action e|
|000013a0| 76 65 72 79 20 52 45 50 | 45 41 54 20 73 65 63 6f |very REP|EAT seco|
|000013b0| 6e 64 73 2c 20 69 66 20 | 52 45 50 45 41 54 20 69 |nds, if |REPEAT i|
|000013c0| 73 20 6e 6f 6e 2d 6e 69 | 6c 2e 0a 54 49 4d 45 20 |s non-ni|l..TIME |
|000013d0| 73 68 6f 75 6c 64 20 62 | 65 20 61 20 73 74 72 69 |should b|e a stri|
|000013e0| 6e 67 20 6c 69 6b 65 20 | 22 31 31 3a 32 33 70 6d |ng like |"11:23pm|
|000013f0| 22 2c 20 6e 69 6c 20 6d | 65 61 6e 69 6e 67 20 6e |", nil m|eaning n|
|00001400| 6f 77 2c 20 61 20 6e 75 | 6d 62 65 72 20 6f 66 20 |ow, a nu|mber of |
|00001410| 73 65 63 6f 6e 64 73 0a | 66 72 6f 6d 20 6e 6f 77 |seconds.|from now|
|00001420| 2c 20 6f 72 20 61 20 76 | 61 6c 75 65 20 66 72 6f |, or a v|alue fro|
|00001430| 6d 20 60 65 6e 63 6f 64 | 65 2d 74 69 6d 65 27 2e |m `encod|e-time'.|
|00001440| 0a 52 45 50 45 41 54 20 | 6d 61 79 20 62 65 20 61 |.REPEAT |may be a|
|00001450| 6e 20 69 6e 74 65 67 65 | 72 20 6f 72 20 66 6c 6f |n intege|r or flo|
|00001460| 61 74 69 6e 67 20 70 6f | 69 6e 74 20 6e 75 6d 62 |ating po|int numb|
|00001470| 65 72 2e 0a 54 68 65 20 | 61 63 74 69 6f 6e 20 69 |er..The |action i|
|00001480| 73 20 74 6f 20 63 61 6c | 6c 20 46 55 4e 43 54 49 |s to cal|l FUNCTI|
|00001490| 4f 4e 20 77 69 74 68 20 | 61 72 67 75 6d 65 6e 74 |ON with |argument|
|000014a0| 73 20 41 52 47 53 2e 0a | 0a 54 68 69 73 20 66 75 |s ARGS..|.This fu|
|000014b0| 6e 63 74 69 6f 6e 20 72 | 65 74 75 72 6e 73 20 61 |nction r|eturns a|
|000014c0| 20 74 69 6d 65 72 20 6f | 62 6a 65 63 74 20 77 68 | timer o|bject wh|
|000014d0| 69 63 68 20 79 6f 75 20 | 63 61 6e 20 75 73 65 20 |ich you |can use |
|000014e0| 69 6e 20 60 63 61 6e 63 | 65 6c 2d 74 69 6d 65 72 |in `canc|el-timer|
|000014f0| 27 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 72 |'...(def|alias 'r|
|00001500| 75 6e 2d 61 74 2d 74 69 | 6d 65 20 23 5b 28 74 69 |un-at-ti|me #[(ti|
|00001510| 6d 65 20 72 65 70 65 61 | 74 20 66 75 6e 63 74 69 |me repea|t functi|
|00001520| 6f 6e 20 26 72 65 73 74 | 20 61 72 67 73 29 20 22 |on &rest| args) "|
|00001530| 08 84 07 00 c1 20 10 08 | a7 83 12 00 c2 c1 20 08 |..... ..|...... .|
|00001540| 5c 22 10 08 3b 83 26 00 | c3 08 21 89 1c 83 25 00 |\"..;.&.|..!...%.|
|00001550| c2 c1 20 5c 66 5c 22 10 | 29 08 3b 83 5c 5c 00 c5 |.. \f\".|).;.\\..|
|00001560| c6 21 88 c7 08 21 c8 20 | 1e 09 89 1e 5c 6e cb 59 |.!...!. |....\n.Y|
|00001570| 83 5b 00 cc cb 0e 5c 6e | cd a6 0e 5c 6e cd a5 ce |.[....\n|...\n...|
|00001580| 0e 09 38 cf 0e 09 38 d0 | 0e 09 38 d1 0e 09 38 26 |..8...8.|..8...8&|
|00001590| 07 10 2a 08 3a 84 65 00 | d2 d3 21 88 0e 14 83 74 |..*.:.e.|..!....t|
|000015a0| 00 0e 14 a7 84 74 00 d2 | d5 21 88 d6 20 1e 17 d8 |.....t..|.!.. ...|
|000015b0| 0e 17 08 0e 14 23 88 d9 | 0e 17 0e 1a 0e 1b 23 88 |.....#..|......#.|
|000015c0| dc 0e 17 21 88 0e 17 29 | 87 22 20 5b 74 69 6d 65 |...!...)|." [time|
|000015d0| 20 63 75 72 72 65 6e 74 | 2d 74 69 6d 65 20 74 69 | current|-time ti|
|000015e0| 6d 65 72 2d 72 65 6c 61 | 74 69 76 65 2d 74 69 6d |mer-rela|tive-tim|
|000015f0| 65 20 74 69 6d 65 72 2d | 64 75 72 61 74 69 6f 6e |e timer-|duration|
|00001600| 20 73 65 63 73 20 72 65 | 71 75 69 72 65 20 64 69 | secs re|quire di|
|00001610| 61 72 79 2d 6c 69 62 20 | 64 69 61 72 79 2d 65 6e |ary-lib |diary-en|
|00001620| 74 72 79 2d 74 69 6d 65 | 20 64 65 63 6f 64 65 2d |try-time| decode-|
|00001630| 74 69 6d 65 20 6e 6f 77 | 20 68 68 6d 6d 20 30 20 |time now| hhmm 0 |
|00001640| 65 6e 63 6f 64 65 2d 74 | 69 6d 65 20 31 30 30 20 |encode-t|ime 100 |
|00001650| 33 20 34 20 35 20 38 20 | 65 72 72 6f 72 20 22 49 |3 4 5 8 |error "I|
|00001660| 6e 76 61 6c 69 64 20 74 | 69 6d 65 20 66 6f 72 6d |nvalid t|ime form|
|00001670| 61 74 22 20 72 65 70 65 | 61 74 20 22 49 6e 76 61 |at" repe|at "Inva|
|00001680| 6c 69 64 20 72 65 70 65 | 74 69 74 69 6f 6e 20 69 |lid repe|tition i|
|00001690| 6e 74 65 72 76 61 6c 22 | 20 74 69 6d 65 72 2d 63 |nterval"| timer-c|
|000016a0| 72 65 61 74 65 20 74 69 | 6d 65 72 20 74 69 6d 65 |reate ti|mer time|
|000016b0| 72 2d 73 65 74 2d 74 69 | 6d 65 20 74 69 6d 65 72 |r-set-ti|me timer|
|000016c0| 2d 73 65 74 2d 66 75 6e | 63 74 69 6f 6e 20 66 75 |-set-fun|ction fu|
|000016d0| 6e 63 74 69 6f 6e 20 61 | 72 67 73 20 74 69 6d 65 |nction a|rgs time|
|000016e0| 72 2d 61 63 74 69 76 61 | 74 65 5d 20 31 30 20 28 |r-activa|te] 10 (|
|000016f0| 23 24 20 2e 20 34 39 35 | 36 29 20 22 73 52 75 6e |#$ . 495|6) "sRun|
|00001700| 20 61 74 20 74 69 6d 65 | 3a 20 5c 6e 4e 52 65 70 | at time|: \nNRep|
|00001710| 65 61 74 20 69 6e 74 65 | 72 76 61 6c 3a 20 5c 6e |eat inte|rval: \n|
|00001720| 61 46 75 6e 63 74 69 6f | 6e 3a 20 22 5d 29 0a 23 |aFunctio|n: "]).#|
|00001730| 40 32 39 38 20 50 65 72 | 66 6f 72 6d 20 61 6e 20 |@298 Per|form an |
|00001740| 61 63 74 69 6f 6e 20 61 | 66 74 65 72 20 61 20 64 |action a|fter a d|
|00001750| 65 6c 61 79 20 6f 66 20 | 53 45 43 53 20 73 65 63 |elay of |SECS sec|
|00001760| 6f 6e 64 73 2e 0a 52 65 | 70 65 61 74 20 74 68 65 |onds..Re|peat the|
|00001770| 20 61 63 74 69 6f 6e 20 | 65 76 65 72 79 20 52 45 | action |every RE|
|00001780| 50 45 41 54 20 73 65 63 | 6f 6e 64 73 2c 20 69 66 |PEAT sec|onds, if|
|00001790| 20 52 45 50 45 41 54 20 | 69 73 20 6e 6f 6e 2d 6e | REPEAT |is non-n|
|000017a0| 69 6c 2e 0a 53 45 43 53 | 20 61 6e 64 20 52 45 50 |il..SECS| and REP|
|000017b0| 45 41 54 20 6d 61 79 20 | 62 65 20 69 6e 74 65 67 |EAT may |be integ|
|000017c0| 65 72 73 20 6f 72 20 66 | 6c 6f 61 74 69 6e 67 20 |ers or f|loating |
|000017d0| 70 6f 69 6e 74 20 6e 75 | 6d 62 65 72 73 2e 0a 54 |point nu|mbers..T|
|000017e0| 68 65 20 61 63 74 69 6f | 6e 20 69 73 20 74 6f 20 |he actio|n is to |
|000017f0| 63 61 6c 6c 20 46 55 4e | 43 54 49 4f 4e 20 77 69 |call FUN|CTION wi|
|00001800| 74 68 20 61 72 67 75 6d | 65 6e 74 73 20 41 52 47 |th argum|ents ARG|
|00001810| 53 2e 0a 0a 54 68 69 73 | 20 66 75 6e 63 74 69 6f |S...This| functio|
|00001820| 6e 20 72 65 74 75 72 6e | 73 20 61 20 74 69 6d 65 |n return|s a time|
|00001830| 72 20 6f 62 6a 65 63 74 | 20 77 68 69 63 68 20 79 |r object| which y|
|00001840| 6f 75 20 63 61 6e 20 75 | 73 65 20 69 6e 20 60 63 |ou can u|se in `c|
|00001850| 61 6e 63 65 6c 2d 74 69 | 6d 65 72 27 2e 1f 0a 28 |ancel-ti|mer'...(|
|00001860| 64 65 66 61 6c 69 61 73 | 20 27 72 75 6e 2d 77 69 |defalias| 'run-wi|
|00001870| 74 68 2d 74 69 6d 65 72 | 20 23 5b 28 73 65 63 73 |th-timer| #[(secs|
|00001880| 20 72 65 70 65 61 74 20 | 66 75 6e 63 74 69 6f 6e | repeat |function|
|00001890| 20 26 72 65 73 74 20 61 | 72 67 73 29 20 22 c0 c1 | &rest a|rgs) "..|
|000018a0| 5c 6e 0b 5c 66 0d 25 87 | 22 20 5b 61 70 70 6c 79 |\n.\f.%.|" [apply|
|000018b0| 20 72 75 6e 2d 61 74 2d | 74 69 6d 65 20 73 65 63 | run-at-|time sec|
|000018c0| 73 20 72 65 70 65 61 74 | 20 66 75 6e 63 74 69 6f |s repeat| functio|
|000018d0| 6e 20 61 72 67 73 5d 20 | 36 20 28 23 24 20 2e 20 |n args] |6 (#$ . |
|000018e0| 35 39 34 31 29 20 22 73 | 52 75 6e 20 61 66 74 65 |5941) "s|Run afte|
|000018f0| 72 20 64 65 6c 61 79 20 | 28 73 65 63 6f 6e 64 73 |r delay |(seconds|
|00001900| 29 3a 20 5c 6e 4e 52 65 | 70 65 61 74 20 69 6e 74 |): \nNRe|peat int|
|00001910| 65 72 76 61 6c 3a 20 5c | 6e 61 46 75 6e 63 74 69 |erval: \|naFuncti|
|00001920| 6f 6e 3a 20 22 5d 29 0a | 23 40 31 39 35 20 41 64 |on: "]).|#@195 Ad|
|00001930| 64 20 61 20 74 69 6d 65 | 72 20 74 6f 20 72 75 6e |d a time|r to run|
|00001940| 20 53 45 43 53 20 73 65 | 63 6f 6e 64 73 20 66 72 | SECS se|conds fr|
|00001950| 6f 6d 20 6e 6f 77 2c 20 | 74 6f 20 63 61 6c 6c 20 |om now, |to call |
|00001960| 46 55 4e 43 54 49 4f 4e | 20 6f 6e 20 4f 42 4a 45 |FUNCTION| on OBJE|
|00001970| 43 54 2e 0a 49 66 20 52 | 45 50 45 41 54 20 69 73 |CT..If R|EPEAT is|
|00001980| 20 6e 6f 6e 2d 6e 69 6c | 2c 20 72 65 70 65 61 74 | non-nil|, repeat|
|00001990| 20 74 68 65 20 74 69 6d | 65 72 20 65 76 65 72 79 | the tim|er every|
|000019a0| 20 52 45 50 45 41 54 20 | 73 65 63 6f 6e 64 73 2e | REPEAT |seconds.|
|000019b0| 0a 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 69 |.This fu|nction i|
|000019c0| 73 20 66 6f 72 20 63 6f | 6d 70 61 74 69 62 69 6c |s for co|mpatibil|
|000019d0| 69 74 79 3b 20 73 65 65 | 20 61 6c 73 6f 20 60 72 |ity; see| also `r|
|000019e0| 75 6e 2d 77 69 74 68 2d | 74 69 6d 65 72 27 2e 1f |un-with-|timer'..|
|000019f0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 61 64 64 2d |.(defali|as 'add-|
|00001a00| 74 69 6d 65 6f 75 74 20 | 23 5b 28 73 65 63 73 20 |timeout |#[(secs |
|00001a10| 66 75 6e 63 74 69 6f 6e | 20 6f 62 6a 65 63 74 20 |function| object |
|00001a20| 26 6f 70 74 69 6f 6e 61 | 6c 20 72 65 70 65 61 74 |&optiona|l repeat|
|00001a30| 29 20 22 c0 09 5c 6e 0b | 5c 66 24 87 22 20 5b 72 |) "..\n.|\f$." [r|
|00001a40| 75 6e 2d 77 69 74 68 2d | 74 69 6d 65 72 20 73 65 |un-with-|timer se|
|00001a50| 63 73 20 72 65 70 65 61 | 74 20 66 75 6e 63 74 69 |cs repea|t functi|
|00001a60| 6f 6e 20 6f 62 6a 65 63 | 74 5d 20 35 20 28 23 24 |on objec|t] 5 (#$|
|00001a70| 20 2e 20 36 34 34 36 29 | 5d 29 0a 23 40 33 31 35 | . 6446)|]).#@315|
|00001a80| 20 50 65 72 66 6f 72 6d | 20 61 6e 20 61 63 74 69 | Perform| an acti|
|00001a90| 6f 6e 20 74 68 65 20 6e | 65 78 74 20 74 69 6d 65 |on the n|ext time|
|00001aa0| 20 45 6d 61 63 73 20 69 | 73 20 69 64 6c 65 20 66 | Emacs i|s idle f|
|00001ab0| 6f 72 20 53 45 43 53 20 | 73 65 63 6f 6e 64 73 2e |or SECS |seconds.|
|00001ac0| 0a 49 66 20 52 45 50 45 | 41 54 20 69 73 20 6e 6f |.If REPE|AT is no|
|00001ad0| 6e 2d 6e 69 6c 2c 20 64 | 6f 20 74 68 69 73 20 65 |n-nil, d|o this e|
|00001ae0| 61 63 68 20 74 69 6d 65 | 20 45 6d 61 63 73 20 69 |ach time| Emacs i|
|00001af0| 73 20 69 64 6c 65 20 66 | 6f 72 20 53 45 43 53 20 |s idle f|or SECS |
|00001b00| 73 65 63 6f 6e 64 73 2e | 0a 53 45 43 53 20 6d 61 |seconds.|.SECS ma|
|00001b10| 79 20 62 65 20 61 6e 20 | 69 6e 74 65 67 65 72 20 |y be an |integer |
|00001b20| 6f 72 20 61 20 66 6c 6f | 61 74 69 6e 67 20 70 6f |or a flo|ating po|
|00001b30| 69 6e 74 20 6e 75 6d 62 | 65 72 2e 0a 54 68 65 20 |int numb|er..The |
|00001b40| 61 63 74 69 6f 6e 20 69 | 73 20 74 6f 20 63 61 6c |action i|s to cal|
|00001b50| 6c 20 46 55 4e 43 54 49 | 4f 4e 20 77 69 74 68 20 |l FUNCTI|ON with |
|00001b60| 61 72 67 75 6d 65 6e 74 | 73 20 41 52 47 53 2e 0a |argument|s ARGS..|
|00001b70| 0a 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 72 |.This fu|nction r|
|00001b80| 65 74 75 72 6e 73 20 61 | 20 74 69 6d 65 72 20 6f |eturns a| timer o|
|00001b90| 62 6a 65 63 74 20 77 68 | 69 63 68 20 79 6f 75 20 |bject wh|ich you |
|00001ba0| 63 61 6e 20 75 73 65 20 | 69 6e 20 60 63 61 6e 63 |can use |in `canc|
|00001bb0| 65 6c 2d 74 69 6d 65 72 | 27 2e 1f 0a 28 64 65 66 |el-timer|'...(def|
|00001bc0| 61 6c 69 61 73 20 27 72 | 75 6e 2d 77 69 74 68 2d |alias 'r|un-with-|
|00001bd0| 69 64 6c 65 2d 74 69 6d | 65 72 20 23 5b 28 73 65 |idle-tim|er #[(se|
|00001be0| 63 73 20 72 65 70 65 61 | 74 20 66 75 6e 63 74 69 |cs repea|t functi|
|00001bf0| 6f 6e 20 26 72 65 73 74 | 20 61 72 67 73 29 20 22 |on &rest| args) "|
|00001c00| c0 20 19 c2 09 0b 5c 66 | 23 88 c5 09 0e 06 0e 07 |. ....\f|#.......|
|00001c10| 23 88 c8 09 21 88 09 29 | 87 22 20 5b 74 69 6d 65 |#...!..)|." [time|
|00001c20| 72 2d 63 72 65 61 74 65 | 20 74 69 6d 65 72 20 74 |r-create| timer t|
|00001c30| 69 6d 65 72 2d 73 65 74 | 2d 66 75 6e 63 74 69 6f |imer-set|-functio|
|00001c40| 6e 20 66 75 6e 63 74 69 | 6f 6e 20 61 72 67 73 20 |n functi|on args |
|00001c50| 74 69 6d 65 72 2d 73 65 | 74 2d 69 64 6c 65 2d 74 |timer-se|t-idle-t|
|00001c60| 69 6d 65 20 73 65 63 73 | 20 72 65 70 65 61 74 20 |ime secs| repeat |
|00001c70| 74 69 6d 65 72 2d 61 63 | 74 69 76 61 74 65 2d 77 |timer-ac|tivate-w|
|00001c80| 68 65 6e 2d 69 64 6c 65 | 5d 20 34 20 28 23 24 20 |hen-idle|] 4 (#$ |
|00001c90| 2e 20 36 37 38 35 29 20 | 28 6c 69 73 74 20 28 72 |. 6785) |(list (r|
|00001ca0| 65 61 64 2d 66 72 6f 6d | 2d 6d 69 6e 69 62 75 66 |ead-from|-minibuf|
|00001cb0| 66 65 72 20 22 52 75 6e | 20 61 66 74 65 72 20 69 |fer "Run| after i|
|00001cc0| 64 6c 65 20 28 73 65 63 | 6f 6e 64 73 29 3a 20 22 |dle (sec|onds): "|
|00001cd0| 20 6e 69 6c 20 6e 69 6c | 20 74 29 20 28 79 2d 6f | nil nil| t) (y-o|
|00001ce0| 72 2d 6e 2d 70 20 22 52 | 65 70 65 61 74 20 65 61 |r-n-p "R|epeat ea|
|00001cf0| 63 68 20 74 69 6d 65 20 | 45 6d 61 63 73 20 69 73 |ch time |Emacs is|
|00001d00| 20 69 64 6c 65 3f 20 22 | 29 20 28 69 6e 74 65 72 | idle? "|) (inter|
|00001d10| 6e 20 28 63 6f 6d 70 6c | 65 74 69 6e 67 2d 72 65 |n (compl|eting-re|
|00001d20| 61 64 20 22 46 75 6e 63 | 74 69 6f 6e 3a 20 22 20 |ad "Func|tion: " |
|00001d30| 6f 62 61 72 72 61 79 20 | 28 71 75 6f 74 65 20 66 |obarray |(quote f|
|00001d40| 62 6f 75 6e 64 70 29 20 | 74 29 29 29 5d 29 0a 28 |boundp) |t)))]).(|
|00001d50| 64 65 66 61 6c 69 61 73 | 20 27 77 69 74 68 2d 74 |defalias| 'with-t|
|00001d60| 69 6d 65 6f 75 74 2d 68 | 61 6e 64 6c 65 72 20 23 |imeout-h|andler #|
|00001d70| 5b 28 74 61 67 29 20 22 | c0 09 c2 5c 22 87 22 20 |[(tag) "|...\"." |
|00001d80| 5b 74 68 72 6f 77 20 74 | 61 67 20 74 69 6d 65 6f |[throw t|ag timeo|
|00001d90| 75 74 5d 20 33 5d 29 0a | 23 40 34 35 30 20 52 75 |ut] 3]).|#@450 Ru|
|00001da0| 6e 20 42 4f 44 59 2c 20 | 62 75 74 20 69 66 20 69 |n BODY, |but if i|
|00001db0| 74 20 64 6f 65 73 6e 27 | 74 20 66 69 6e 69 73 68 |t doesn'|t finish|
|00001dc0| 20 69 6e 20 53 45 43 4f | 4e 44 53 20 73 65 63 6f | in SECO|NDS seco|
|00001dd0| 6e 64 73 2c 20 67 69 76 | 65 20 75 70 2e 0a 49 66 |nds, giv|e up..If|
|00001de0| 20 77 65 20 67 69 76 65 | 20 75 70 2c 20 77 65 20 | we give| up, we |
|00001df0| 72 75 6e 20 74 68 65 20 | 54 49 4d 45 4f 55 54 2d |run the |TIMEOUT-|
|00001e00| 46 4f 52 4d 53 20 61 6e | 64 20 72 65 74 75 72 6e |FORMS an|d return|
|00001e10| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 | the val|ue of th|
|00001e20| 65 20 6c 61 73 74 20 6f | 6e 65 2e 0a 54 68 65 20 |e last o|ne..The |
|00001e30| 63 61 6c 6c 20 73 68 6f | 75 6c 64 20 6c 6f 6f 6b |call sho|uld look|
|00001e40| 20 6c 69 6b 65 3a 0a 20 | 28 77 69 74 68 2d 74 69 | like:. |(with-ti|
|00001e50| 6d 65 6f 75 74 20 28 53 | 45 43 4f 4e 44 53 20 54 |meout (S|ECONDS T|
|00001e60| 49 4d 45 4f 55 54 2d 46 | 4f 52 4d 53 2e 2e 2e 29 |IMEOUT-F|ORMS...)|
|00001e70| 20 42 4f 44 59 2e 2e 2e | 29 0a 54 68 65 20 74 69 | BODY...|).The ti|
|00001e80| 6d 65 6f 75 74 20 69 73 | 20 63 68 65 63 6b 65 64 |meout is| checked|
|00001e90| 20 77 68 65 6e 65 76 65 | 72 20 45 6d 61 63 73 20 | wheneve|r Emacs |
|00001ea0| 77 61 69 74 73 20 66 6f | 72 20 73 6f 6d 65 20 6b |waits fo|r some k|
|00001eb0| 69 6e 64 20 6f 66 20 65 | 78 74 65 72 6e 61 6c 0a |ind of e|xternal.|
|00001ec0| 65 76 65 6e 74 20 28 73 | 75 63 68 20 61 73 20 6b |event (s|uch as k|
|00001ed0| 65 79 62 6f 61 72 64 20 | 69 6e 70 75 74 2c 20 69 |eyboard |input, i|
|00001ee0| 6e 70 75 74 20 66 72 6f | 6d 20 73 75 62 70 72 6f |nput fro|m subpro|
|00001ef0| 63 65 73 73 65 73 2c 20 | 6f 72 20 61 20 63 65 72 |cesses, |or a cer|
|00001f00| 74 61 69 6e 20 74 69 6d | 65 29 3b 0a 69 66 20 74 |tain tim|e);.if t|
|00001f10| 68 65 20 70 72 6f 67 72 | 61 6d 20 6c 6f 6f 70 73 |he progr|am loops|
|00001f20| 20 77 69 74 68 6f 75 74 | 20 77 61 69 74 69 6e 67 | without| waiting|
|00001f30| 20 69 6e 20 61 6e 79 20 | 77 61 79 2c 20 74 68 65 | in any |way, the|
|00001f40| 20 74 69 6d 65 6f 75 74 | 20 77 69 6c 6c 20 6e 6f | timeout| will no|
|00001f50| 74 0a 62 65 20 64 65 74 | 65 63 74 65 64 2e 1f 0a |t.be det|ected...|
|00001f60| 28 64 65 66 61 6c 69 61 | 73 20 27 77 69 74 68 2d |(defalia|s 'with-|
|00001f70| 74 69 6d 65 6f 75 74 20 | 27 28 6d 61 63 72 6f 20 |timeout |'(macro |
|00001f80| 2e 20 23 5b 28 6c 69 73 | 74 20 26 72 65 73 74 20 |. #[(lis|t &rest |
|00001f90| 62 6f 64 79 29 20 22 08 | 40 08 41 19 1a c3 c4 c5 |body) ".|@.A.....|
|00001fa0| c6 c7 c8 c9 ca cb 5c 6e | cc 42 42 45 c9 cd c8 0e |......\n|.BBE....|
|00001fb0| 0e 42 45 cf 42 42 42 45 | c8 09 42 d0 42 42 42 45 |.BE.BBBE|..B.BBBE|
|00001fc0| 2a 87 22 20 5b 6c 69 73 | 74 20 74 69 6d 65 6f 75 |*." [lis|t timeou|
|00001fd0| 74 2d 66 6f 72 6d 73 20 | 73 65 63 6f 6e 64 73 20 |t-forms |seconds |
|00001fe0| 6c 65 74 20 28 28 77 69 | 74 68 2d 74 69 6d 65 6f |let ((wi|th-timeo|
|00001ff0| 75 74 2d 74 61 67 20 28 | 63 6f 6e 73 20 6e 69 6c |ut-tag (|cons nil|
|00002000| 20 6e 69 6c 29 29 20 77 | 69 74 68 2d 74 69 6d 65 | nil)) w|ith-time|
|00002010| 6f 75 74 2d 76 61 6c 75 | 65 20 77 69 74 68 2d 74 |out-valu|e with-t|
|00002020| 69 6d 65 6f 75 74 2d 74 | 69 6d 65 72 29 20 69 66 |imeout-t|imer) if|
|00002030| 20 63 61 74 63 68 20 77 | 69 74 68 2d 74 69 6d 65 | catch w|ith-time|
|00002040| 6f 75 74 2d 74 61 67 20 | 70 72 6f 67 6e 20 73 65 |out-tag |progn se|
|00002050| 74 71 20 77 69 74 68 2d | 74 69 6d 65 6f 75 74 2d |tq with-|timeout-|
|00002060| 74 69 6d 65 72 20 72 75 | 6e 2d 77 69 74 68 2d 74 |timer ru|n-with-t|
|00002070| 69 6d 65 72 20 28 6e 69 | 6c 20 28 71 75 6f 74 65 |imer (ni|l (quote|
|00002080| 20 77 69 74 68 2d 74 69 | 6d 65 6f 75 74 2d 68 61 | with-ti|meout-ha|
|00002090| 6e 64 6c 65 72 29 20 77 | 69 74 68 2d 74 69 6d 65 |ndler) w|ith-time|
|000020a0| 6f 75 74 2d 74 61 67 29 | 20 77 69 74 68 2d 74 69 |out-tag)| with-ti|
|000020b0| 6d 65 6f 75 74 2d 76 61 | 6c 75 65 20 62 6f 64 79 |meout-va|lue body|
|000020c0| 20 28 6e 69 6c 29 20 28 | 28 63 61 6e 63 65 6c 2d | (nil) (|(cancel-|
|000020d0| 74 69 6d 65 72 20 77 69 | 74 68 2d 74 69 6d 65 6f |timer wi|th-timeo|
|000020e0| 75 74 2d 74 69 6d 65 72 | 29 20 77 69 74 68 2d 74 |ut-timer|) with-t|
|000020f0| 69 6d 65 6f 75 74 2d 76 | 61 6c 75 65 29 5d 20 31 |imeout-v|alue)] 1|
|00002100| 31 20 28 23 24 20 2e 20 | 37 35 38 32 29 5d 29 29 |1 (#$ . |7582)]))|
|00002110| 0a 23 40 31 31 34 20 4c | 69 6b 65 20 28 79 2d 6f |.#@114 L|ike (y-o|
|00002120| 72 2d 6e 2d 70 20 50 52 | 4f 4d 50 54 29 2c 20 77 |r-n-p PR|OMPT), w|
|00002130| 69 74 68 20 61 20 74 69 | 6d 65 6f 75 74 2e 0a 49 |ith a ti|meout..I|
|00002140| 66 20 74 68 65 20 75 73 | 65 72 20 64 6f 65 73 20 |f the us|er does |
|00002150| 6e 6f 74 20 61 6e 73 77 | 65 72 20 61 66 74 65 72 |not answ|er after|
|00002160| 20 53 45 43 4f 4e 44 53 | 20 73 65 63 6f 6e 64 73 | SECONDS| seconds|
|00002170| 2c 20 72 65 74 75 72 6e | 20 44 45 46 41 55 4c 54 |, return| DEFAULT|
|00002180| 2d 56 41 4c 55 45 2e 1f | 0a 28 64 65 66 61 6c 69 |-VALUE..|.(defali|
|00002190| 61 73 20 27 79 2d 6f 72 | 2d 6e 2d 70 2d 77 69 74 |as 'y-or|-n-p-wit|
|000021a0| 68 2d 74 69 6d 65 6f 75 | 74 20 23 5b 28 70 72 6f |h-timeou|t #[(pro|
|000021b0| 6d 70 74 20 73 65 63 6f | 6e 64 73 20 64 65 66 61 |mpt seco|nds defa|
|000021c0| 75 6c 74 2d 76 61 6c 75 | 65 29 20 22 c0 89 42 c0 |ult-valu|e) "..B.|
|000021d0| 89 19 1a 89 1b c4 8d 83 | 12 00 0d 82 17 00 c6 09 |........|........|
|000021e0| 21 88 5c 6e 2b 87 22 20 | 5b 6e 69 6c 20 77 69 74 |!.\n+." |[nil wit|
|000021f0| 68 2d 74 69 6d 65 6f 75 | 74 2d 74 69 6d 65 72 20 |h-timeou|t-timer |
|00002200| 77 69 74 68 2d 74 69 6d | 65 6f 75 74 2d 76 61 6c |with-tim|eout-val|
|00002210| 75 65 20 77 69 74 68 2d | 74 69 6d 65 6f 75 74 2d |ue with-|timeout-|
|00002220| 74 61 67 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |tag (byt|e-code "|
|00002230| c0 09 c2 c3 5c 66 24 15 | c6 0e 07 21 16 08 c2 87 |....\f$.|...!....|
|00002240| 22 20 5b 72 75 6e 2d 77 | 69 74 68 2d 74 69 6d 65 |" [run-w|ith-time|
|00002250| 72 20 73 65 63 6f 6e 64 | 73 20 6e 69 6c 20 77 69 |r second|s nil wi|
|00002260| 74 68 2d 74 69 6d 65 6f | 75 74 2d 68 61 6e 64 6c |th-timeo|ut-handl|
|00002270| 65 72 20 77 69 74 68 2d | 74 69 6d 65 6f 75 74 2d |er with-|timeout-|
|00002280| 74 61 67 20 77 69 74 68 | 2d 74 69 6d 65 6f 75 74 |tag with|-timeout|
|00002290| 2d 74 69 6d 65 72 20 79 | 2d 6f 72 2d 6e 2d 70 20 |-timer y|-or-n-p |
|000022a0| 70 72 6f 6d 70 74 20 77 | 69 74 68 2d 74 69 6d 65 |prompt w|ith-time|
|000022b0| 6f 75 74 2d 76 61 6c 75 | 65 5d 20 35 29 20 64 65 |out-valu|e] 5) de|
|000022c0| 66 61 75 6c 74 2d 76 61 | 6c 75 65 20 63 61 6e 63 |fault-va|lue canc|
|000022d0| 65 6c 2d 74 69 6d 65 72 | 5d 20 34 20 28 23 24 20 |el-timer|] 4 (#$ |
|000022e0| 2e 20 38 34 37 31 29 5d | 29 0a 23 40 35 34 20 41 |. 8471)]|).#@54 A|
|000022f0| 6c 69 73 74 20 6d 61 70 | 70 69 6e 67 20 74 65 6d |list map|ping tem|
|00002300| 70 6f 72 61 6c 20 77 6f | 72 64 73 20 74 6f 20 64 |poral wo|rds to d|
|00002310| 75 72 61 74 69 6f 6e 73 | 20 69 6e 20 73 65 63 6f |urations| in seco|
|00002320| 6e 64 73 1f 0a 28 64 65 | 66 76 61 72 20 74 69 6d |nds..(de|fvar tim|
|00002330| 65 72 2d 64 75 72 61 74 | 69 6f 6e 2d 77 6f 72 64 |er-durat|ion-word|
|00002340| 73 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 c1 |s (byte-|code "..|
|00002350| 42 c2 c3 42 c4 c5 42 c6 | c7 42 c8 c9 42 ca c9 42 |B..B..B.|.B..B..B|
|00002360| cb cc 42 cd cc 42 ce cf | 42 d0 d1 42 d2 d3 42 d4 |..B..B..|B..B..B.|
|00002370| d5 42 d6 d7 42 d8 d9 d1 | 5f 42 af 0e 87 22 20 5b |.B..B...|_B..." [|
|00002380| 22 6d 69 63 72 6f 73 65 | 63 22 20 31 65 2d 30 30 |"microse|c" 1e-00|
|00002390| 36 20 22 6d 69 63 72 6f | 73 65 63 6f 6e 64 22 20 |6 "micro|second" |
|000023a0| 31 65 2d 30 30 36 20 22 | 6d 69 6c 6c 69 73 65 63 |1e-006 "|millisec|
|000023b0| 22 20 2e 30 30 31 20 22 | 6d 69 6c 6c 69 73 65 63 |" .001 "|millisec|
|000023c0| 6f 6e 64 22 20 2e 30 30 | 31 20 22 73 65 63 22 20 |ond" .00|1 "sec" |
|000023d0| 31 20 22 73 65 63 6f 6e | 64 22 20 22 6d 69 6e 22 |1 "secon|d" "min"|
|000023e0| 20 36 30 20 22 6d 69 6e | 75 74 65 22 20 22 68 6f | 60 "min|ute" "ho|
|000023f0| 75 72 22 20 33 36 30 30 | 20 22 64 61 79 22 20 38 |ur" 3600| "day" 8|
|00002400| 36 34 30 30 20 22 77 65 | 65 6b 22 20 36 30 34 38 |6400 "we|ek" 6048|
|00002410| 30 30 20 22 66 6f 72 74 | 6e 69 67 68 74 22 20 31 |00 "fort|night" 1|
|00002420| 32 30 39 36 30 30 20 22 | 6d 6f 6e 74 68 22 20 32 |209600 "|month" 2|
|00002430| 35 39 32 30 30 30 20 22 | 79 65 61 72 22 20 33 36 |592000 "|year" 36|
|00002440| 35 2e 32 35 5d 20 31 36 | 29 20 28 23 24 20 2e 20 |5.25] 16|) (#$ . |
|00002450| 38 39 34 33 29 29 0a 23 | 40 37 32 20 52 65 74 75 |8943)).#|@72 Retu|
|00002460| 72 6e 20 6e 75 6d 62 65 | 72 20 6f 66 20 73 65 63 |rn numbe|r of sec|
|00002470| 6f 6e 64 73 20 73 70 65 | 63 69 66 69 65 64 20 62 |onds spe|cified b|
|00002480| 79 20 53 54 52 49 4e 47 | 2c 20 6f 72 20 6e 69 6c |y STRING|, or nil|
|00002490| 20 69 66 20 70 61 72 73 | 69 6e 67 20 66 61 69 6c | if pars|ing fail|
|000024a0| 73 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 74 |s...(def|alias 't|
|000024b0| 69 6d 65 72 2d 64 75 72 | 61 74 69 6f 6e 20 23 5b |imer-dur|ation #[|
|000024c0| 28 73 74 72 69 6e 67 29 | 20 22 c0 89 c1 1a 1b 1c |(string)| "......|
|000024d0| c5 c6 0e 07 0b 23 83 4a | 00 c8 94 83 1e 00 c9 ca |.....#.J|........|
|000024e0| c8 0e 07 5c 22 21 82 1f | 00 c8 cb ca cc 0e 07 5c |...\"!..|.......\|
|000024f0| 22 0e 0d 5c 22 41 1e 0e | 1e 0f 0e 0e 83 40 00 c0 |"..\"A..|.....@..|
|00002500| 95 13 5c 66 0e 0f 0e 0e | 5f 5c 5c 14 82 46 00 d0 |..\f....|_\\..F..|
|00002510| 14 0e 07 47 13 2a 82 06 | 00 0b 0e 07 47 55 83 56 |...G.*..|....GU.V|
|00002520| 00 5c 66 82 62 00 c5 d1 | 0e 07 5c 22 85 62 00 c9 |.\f.b...|..\".b..|
|00002530| 0e 07 21 2b 87 22 20 5b | 30 20 74 20 63 61 73 65 |..!+." [|0 t case|
|00002540| 2d 66 6f 6c 64 2d 73 65 | 61 72 63 68 20 73 74 61 |-fold-se|arch sta|
|00002550| 72 74 20 73 65 63 73 20 | 73 74 72 69 6e 67 2d 6d |rt secs |string-m|
|00002560| 61 74 63 68 20 22 5b 20 | 09 5d 2a 5c 5c 28 5b 30 |atch "[ |.]*\\([0|
|00002570| 2d 39 2e 5d 2b 5c 5c 29 | 3f 5b 20 09 5d 2a 5c 5c |-9.]+\\)|?[ .]*\\|
|00002580| 28 5b 61 2d 7a 5d 2b 5b | 61 2d 72 74 2d 7a 5d 5c |([a-z]+[|a-rt-z]\|
|00002590| 5c 29 73 3f 5b 20 09 5d | 2a 22 20 73 74 72 69 6e |\)s?[ .]|*" strin|
|000025a0| 67 20 31 20 73 74 72 69 | 6e 67 2d 74 6f 2d 6e 75 |g 1 stri|ng-to-nu|
|000025b0| 6d 62 65 72 20 6d 61 74 | 63 68 2d 73 74 72 69 6e |mber mat|ch-strin|
|000025c0| 67 20 61 73 73 6f 63 20 | 32 20 74 69 6d 65 72 2d |g assoc |2 timer-|
|000025d0| 64 75 72 61 74 69 6f 6e | 2d 77 6f 72 64 73 20 69 |duration|-words i|
|000025e0| 74 65 6d 73 69 7a 65 20 | 63 6f 75 6e 74 20 6e 69 |temsize |count ni|
|000025f0| 6c 20 22 5c 5c 60 5b 30 | 2d 39 2e 5d 2b 5c 5c 27 |l "\\`[0|-9.]+\\'|
|00002600| 22 5d 20 35 20 28 23 24 | 20 2e 20 39 33 30 38 29 |"] 5 (#$| . 9308)|
|00002610| 5d 29 0a 28 70 72 6f 76 | 69 64 65 20 28 71 75 6f |]).(prov|ide (quo|
|00002620| 74 65 20 74 69 6d 65 72 | 29 29 0a |te timer|)). |
+--------+-------------------------+-------------------------+--------+--------+