Artifact
38572fd24ba37b64e3706b99f64d24fb4ecdc599:
0000: 3b 3b 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 ;; Copyright (c)
0010: 20 48 69 67 65 70 6f 6e 28 54 61 72 6f 20 4d 69 Higepon(Taro Mi
0020: 6e 6f 77 61 29 0a 3b 3b 0a 3b 3b 20 50 65 72 6d nowa).;;.;; Perm
0030: 69 73 73 69 6f 6e 20 69 73 20 68 65 72 65 62 79 ission is hereby
0040: 20 67 72 61 6e 74 65 64 2c 20 66 72 65 65 20 6f granted, free o
0050: 66 20 63 68 61 72 67 65 2c 20 74 6f 20 61 6e 79 f charge, to any
0060: 20 70 65 72 73 6f 6e 20 6f 62 74 61 69 6e 69 6e person obtainin
0070: 67 20 61 0a 3b 3b 20 63 6f 70 79 20 6f 66 20 74 g a.;; copy of t
0080: 68 69 73 20 73 6f 66 74 77 61 72 65 20 61 6e 64 his software and
0090: 20 61 73 73 6f 63 69 61 74 65 64 20 64 6f 63 75 associated docu
00a0: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 mentation files
00b0: 28 74 68 65 20 22 53 6f 66 74 77 61 72 65 22 29 (the "Software")
00c0: 2c 0a 3b 3b 20 74 6f 20 64 65 61 6c 20 69 6e 20 ,.;; to deal in
00d0: 74 68 65 20 53 6f 66 74 77 61 72 65 20 77 69 74 the Software wit
00e0: 68 6f 75 74 20 72 65 73 74 72 69 63 74 69 6f 6e hout restriction
00f0: 2c 20 69 6e 63 6c 75 64 69 6e 67 20 77 69 74 68 , including with
0100: 6f 75 74 20 6c 69 6d 69 74 61 74 69 6f 6e 0a 3b out limitation.;
0110: 3b 20 74 68 65 20 72 69 67 68 74 73 20 74 6f 20 ; the rights to
0120: 75 73 65 2c 20 63 6f 70 79 2c 20 6d 6f 64 69 66 use, copy, modif
0130: 79 2c 20 6d 65 72 67 65 2c 20 70 75 62 6c 69 73 y, merge, publis
0140: 68 2c 20 64 69 73 74 72 69 62 75 74 65 2c 20 73 h, distribute, s
0150: 75 62 6c 69 63 65 6e 73 65 2c 0a 3b 3b 20 61 6e ublicense,.;; an
0160: 64 2f 6f 72 20 73 65 6c 6c 20 63 6f 70 69 65 73 d/or sell copies
0170: 20 6f 66 20 74 68 65 20 53 6f 66 74 77 61 72 65 of the Software
0180: 2c 20 61 6e 64 20 74 6f 20 70 65 72 6d 69 74 20 , and to permit
0190: 70 65 72 73 6f 6e 73 20 74 6f 20 77 68 6f 6d 20 persons to whom
01a0: 74 68 65 0a 3b 3b 20 53 6f 66 74 77 61 72 65 20 the.;; Software
01b0: 69 73 20 66 75 72 6e 69 73 68 65 64 20 74 6f 20 is furnished to
01c0: 64 6f 20 73 6f 2c 20 73 75 62 6a 65 63 74 20 74 do so, subject t
01d0: 6f 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 o the following
01e0: 63 6f 6e 64 69 74 69 6f 6e 73 3a 0a 3b 3b 0a 3b conditions:.;;.;
01f0: 3b 20 54 68 65 20 61 62 6f 76 65 20 63 6f 70 79 ; The above copy
0200: 72 69 67 68 74 20 6e 6f 74 69 63 65 20 61 6e 64 right notice and
0210: 20 74 68 69 73 20 70 65 72 6d 69 73 73 69 6f 6e this permission
0220: 20 6e 6f 74 69 63 65 20 73 68 61 6c 6c 20 62 65 notice shall be
0230: 20 69 6e 63 6c 75 64 65 64 20 69 6e 0a 3b 3b 20 included in.;;
0240: 61 6c 6c 20 63 6f 70 69 65 73 20 6f 72 20 73 75 all copies or su
0250: 62 73 74 61 6e 74 69 61 6c 20 70 6f 72 74 69 6f bstantial portio
0260: 6e 73 20 6f 66 20 74 68 65 20 53 6f 66 74 77 61 ns of the Softwa
0270: 72 65 2e 0a 3b 3b 0a 3b 3b 20 45 78 63 65 70 74 re..;;.;; Except
0280: 20 61 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e as contained in
0290: 20 74 68 69 73 20 6e 6f 74 69 63 65 2c 20 74 68 this notice, th
02a0: 65 20 6e 61 6d 65 28 73 29 20 6f 66 20 74 68 65 e name(s) of the
02b0: 20 61 62 6f 76 65 20 63 6f 70 79 72 69 67 68 74 above copyright
02c0: 0a 3b 3b 20 68 6f 6c 64 65 72 73 20 73 68 61 6c .;; holders shal
02d0: 6c 20 6e 6f 74 20 62 65 20 75 73 65 64 20 69 6e l not be used in
02e0: 20 61 64 76 65 72 74 69 73 69 6e 67 20 6f 72 20 advertising or
02f0: 6f 74 68 65 72 77 69 73 65 20 74 6f 20 70 72 6f otherwise to pro
0300: 6d 6f 74 65 20 74 68 65 20 73 61 6c 65 2c 0a 3b mote the sale,.;
0310: 3b 20 75 73 65 20 6f 72 20 6f 74 68 65 72 20 64 ; use or other d
0320: 65 61 6c 69 6e 67 73 20 69 6e 20 74 68 69 73 20 ealings in this
0330: 53 6f 66 74 77 61 72 65 20 77 69 74 68 6f 75 74 Software without
0340: 20 70 72 69 6f 72 20 77 72 69 74 74 65 6e 20 61 prior written a
0350: 75 74 68 6f 72 69 7a 61 74 69 6f 6e 2e 0a 3b 3b uthorization..;;
0360: 0a 3b 3b 20 54 48 45 20 53 4f 46 54 57 41 52 45 .;; THE SOFTWARE
0370: 20 49 53 20 50 52 4f 56 49 44 45 44 20 22 41 53 IS PROVIDED "AS
0380: 20 49 53 22 2c 20 57 49 54 48 4f 55 54 20 57 41 IS", WITHOUT WA
0390: 52 52 41 4e 54 59 20 4f 46 20 41 4e 59 20 4b 49 RRANTY OF ANY KI
03a0: 4e 44 2c 20 45 58 50 52 45 53 53 20 4f 52 0a 3b ND, EXPRESS OR.;
03b0: 3b 20 49 4d 50 4c 49 45 44 2c 20 49 4e 43 4c 55 ; IMPLIED, INCLU
03c0: 44 49 4e 47 20 42 55 54 20 4e 4f 54 20 4c 49 4d DING BUT NOT LIM
03d0: 49 54 45 44 20 54 4f 20 54 48 45 20 57 41 52 52 ITED TO THE WARR
03e0: 41 4e 54 49 45 53 20 4f 46 20 4d 45 52 43 48 41 ANTIES OF MERCHA
03f0: 4e 54 41 42 49 4c 49 54 59 2c 0a 3b 3b 20 46 49 NTABILITY,.;; FI
0400: 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52 54 TNESS FOR A PART
0410: 49 43 55 4c 41 52 20 50 55 52 50 4f 53 45 20 41 ICULAR PURPOSE A
0420: 4e 44 20 4e 4f 4e 49 4e 46 52 49 4e 47 45 4d 45 ND NONINFRINGEME
0430: 4e 54 2e 20 20 49 4e 20 4e 4f 20 45 56 45 4e 54 NT. IN NO EVENT
0440: 20 53 48 41 4c 4c 0a 3b 3b 20 54 48 45 20 41 55 SHALL.;; THE AU
0450: 54 48 4f 52 53 20 4f 52 20 43 4f 50 59 52 49 47 THORS OR COPYRIG
0460: 48 54 20 48 4f 4c 44 45 52 53 20 42 45 20 4c 49 HT HOLDERS BE LI
0470: 41 42 4c 45 20 46 4f 52 20 41 4e 59 20 43 4c 41 ABLE FOR ANY CLA
0480: 49 4d 2c 20 44 41 4d 41 47 45 53 20 4f 52 20 4f IM, DAMAGES OR O
0490: 54 48 45 52 0a 3b 3b 20 4c 49 41 42 49 4c 49 54 THER.;; LIABILIT
04a0: 59 2c 20 57 48 45 54 48 45 52 20 49 4e 20 41 4e Y, WHETHER IN AN
04b0: 20 41 43 54 49 4f 4e 20 4f 46 20 43 4f 4e 54 52 ACTION OF CONTR
04c0: 41 43 54 2c 20 54 4f 52 54 20 4f 52 20 4f 54 48 ACT, TORT OR OTH
04d0: 45 52 57 49 53 45 2c 20 41 52 49 53 49 4e 47 0a ERWISE, ARISING.
04e0: 3b 3b 20 46 52 4f 4d 2c 20 4f 55 54 20 4f 46 20 ;; FROM, OUT OF
04f0: 4f 52 20 49 4e 20 43 4f 4e 4e 45 43 54 49 4f 4e OR IN CONNECTION
0500: 20 57 49 54 48 20 54 48 45 20 53 4f 46 54 57 41 WITH THE SOFTWA
0510: 52 45 20 4f 52 20 54 48 45 20 55 53 45 20 4f 52 RE OR THE USE OR
0520: 20 4f 54 48 45 52 0a 3b 3b 20 44 45 41 4c 49 4e OTHER.;; DEALIN
0530: 47 53 20 49 4e 20 54 48 45 20 53 4f 46 54 57 41 GS IN THE SOFTWA
0540: 52 45 2e 0a 0a 28 6c 69 62 72 61 72 79 20 28 73 RE...(library (s
0550: 72 66 69 20 73 31 39 20 74 69 6d 65 20 63 6f 6d rfi s19 time com
0560: 70 61 74 29 0a 20 20 28 65 78 70 6f 72 74 0a 20 pat). (export.
0570: 20 20 66 6f 72 6d 61 74 0a 20 20 20 68 6f 73 74 format. host
0580: 3a 74 69 6d 65 2d 72 65 73 6f 6c 75 74 69 6f 6e :time-resolution
0590: 0a 20 20 20 68 6f 73 74 3a 63 75 72 72 65 6e 74 . host:current
05a0: 2d 74 69 6d 65 0a 20 20 20 68 6f 73 74 3a 74 69 -time. host:ti
05b0: 6d 65 2d 6e 61 6e 6f 73 65 63 6f 6e 64 0a 20 20 me-nanosecond.
05c0: 20 68 6f 73 74 3a 74 69 6d 65 2d 73 65 63 6f 6e host:time-secon
05d0: 64 0a 20 20 20 68 6f 73 74 3a 74 69 6d 65 2d 67 d. host:time-g
05e0: 6d 74 2d 6f 66 66 73 65 74 29 0a 20 20 28 69 6d mt-offset). (im
05f0: 70 6f 72 74 0a 20 20 20 28 72 6e 72 73 20 62 61 port. (rnrs ba
0600: 73 65 29 0a 20 20 20 28 6f 6e 6c 79 20 28 6d 6f se). (only (mo
0610: 73 68 29 20 66 6f 72 6d 61 74 29 0a 20 20 20 28 sh) format). (
0620: 6f 6e 6c 79 20 28 73 79 73 74 65 6d 29 20 6d 69 only (system) mi
0630: 63 72 6f 73 65 63 6f 6e 64 73 20 6c 6f 63 61 6c croseconds local
0640: 2d 74 7a 2d 6f 66 66 73 65 74 29 29 0a 0a 20 20 -tz-offset))..
0650: 28 64 65 66 69 6e 65 20 68 6f 73 74 3a 74 69 6d (define host:tim
0660: 65 2d 72 65 73 6f 6c 75 74 69 6f 6e 20 31 30 30 e-resolution 100
0670: 30 29 0a 20 20 28 64 65 66 69 6e 65 20 28 68 6f 0). (define (ho
0680: 73 74 3a 63 75 72 72 65 6e 74 2d 74 69 6d 65 29 st:current-time)
0690: 20 28 6d 69 63 72 6f 73 65 63 6f 6e 64 73 29 29 (microseconds))
06a0: 0a 20 20 28 64 65 66 69 6e 65 20 28 68 6f 73 74 . (define (host
06b0: 3a 74 69 6d 65 2d 6e 61 6e 6f 73 65 63 6f 6e 64 :time-nanosecond
06c0: 20 74 29 20 28 2a 20 28 6d 6f 64 20 74 20 31 30 t) (* (mod t 10
06d0: 30 30 30 30 30 29 20 31 30 30 30 29 29 0a 20 20 00000) 1000)).
06e0: 28 64 65 66 69 6e 65 20 28 68 6f 73 74 3a 74 69 (define (host:ti
06f0: 6d 65 2d 73 65 63 6f 6e 64 20 74 29 20 28 64 69 me-second t) (di
0700: 76 20 74 20 31 30 30 30 30 30 30 29 29 0a 20 20 v t 1000000)).
0710: 28 64 65 66 69 6e 65 20 28 68 6f 73 74 3a 74 69 (define (host:ti
0720: 6d 65 2d 67 6d 74 2d 6f 66 66 73 65 74 20 74 29 me-gmt-offset t)
0730: 20 28 6c 6f 63 61 6c 2d 74 7a 2d 6f 66 66 73 65 (local-tz-offse
0740: 74 29 29 0a 29 0a t)).).