From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#71572: [PATCH] seconds-to-string-approximate Date: Thu, 4 Jul 2024 11:27:41 -0400 Message-ID: <1FFF1E0D-A0E0-4EB9-AC97-AEB0BFADFBBC@gmail.com> References: <86r0cpicwt.fsf@gnu.org> <86msmxafog.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_44515253-DC03-4933-9260-26CB75A7BFBE" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31257"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , 71572@debbugs.gnu.org, jonas@bernoul.li, Paul Eggert To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 04 17:30:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sPOPf-0007o7-2Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jul 2024 17:30:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPOPK-0006W9-8f; Thu, 04 Jul 2024 11:30:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPOPI-0006UQ-Gn for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:30:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPOPI-0004au-8L for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:30:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sPOPK-00050C-6V for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 11:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jul 2024 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71572 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71572-submit@debbugs.gnu.org id=B71572.172010694919130 (code B ref 71572); Thu, 04 Jul 2024 15:30:02 +0000 Original-Received: (at 71572) by debbugs.gnu.org; 4 Jul 2024 15:29:09 +0000 Original-Received: from localhost ([127.0.0.1]:42763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPOOS-0004yS-Gy for submit@debbugs.gnu.org; Thu, 04 Jul 2024 11:29:09 -0400 Original-Received: from mail-qv1-f53.google.com ([209.85.219.53]:52727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPOOQ-0004xv-13 for 71572@debbugs.gnu.org; Thu, 04 Jul 2024 11:29:06 -0400 Original-Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6b5eb69e04cso4643486d6.1 for <71572@debbugs.gnu.org>; Thu, 04 Jul 2024 08:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720106878; x=1720711678; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=VB9w5VZNFAkAlyvhk0jKfaHKIidps99md7Y/93o9xkA=; b=iq9uv7Xykgls99NhRqNM/eHDdbDEOwp4ED7qA0oRB3rysFhVfPmDTL++0z7siw18RI 8eMM0fnGRuUJ/OtE9eEfr1KSo3pbaIJfbXW72ZRDS/9ZfiFvJxa+h8UgJ+m2WiBxkFJ/ MYBZhqAx2cWPczy0BmvhUlBZgc1yLFr26w/2lxXiDqMvh1MDlESudAGQzXMu0o4Czizh lI8SsvjrQ9CCbaQ+ZcYE6OeVeydtIpY7SCjZgaZw7P8QPW0t4F/XSonBC61g6RxX78MM S7KuCI6Jphv63hy18oOxeOgOX0Yo0z6Ifr01zr7J3hssmYLvkCzuYfZ3MnixNzvDAkZB cojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720106878; x=1720711678; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VB9w5VZNFAkAlyvhk0jKfaHKIidps99md7Y/93o9xkA=; b=ipOh+8H/8bzgCAm32EFmd4mahjMaxRLMAcakjMqyP/fd/TBoDj6QHKY9ZELz+BQCAU bBx9ymKQup9xM9Uu5xrK8tVkn/L5IAYV5ULM8+KdGCYuNunR4fN7RNaOx4B0SbJ6QTB6 axi1fV+tAk86BLauK8w0psmlpN+wewUkxHjTgqXcrZzzwvt0SuOrVHFfMFxGPKsoBMbA MPo7g7w/PjAAZK7yCArg8KRs4gMIWKCUQQnG6qEa9Mi8vKntPKtIrSv36C5eZ7zuQHJ7 9UefA6SnxRkA8Qn+wE4m15f2ExxvVkyrA6JDqzPrA0Nx+eon8hAFdkBGhgtdCjEsLUh/ VC8A== X-Forwarded-Encrypted: i=1; AJvYcCWmZH6EESEICO4hPBXsjr6Z35stpKuzovsYDEaXY6/EW5GBoV7As7v2naTQ0s04FQ1/0L4CrGAwT9TsDSRnoiD+xT7CQCA= X-Gm-Message-State: AOJu0YybQt1T4V6kb70PBBdDBIDylM1r1JKDmKP226dAUtU7e7FUFnib yYnTMRnJyvXgZ+Wg1pdURTY/6iQcATfKkn3/tYf8mW47o2lf+Ugb X-Google-Smtp-Source: AGHT+IG5AUL3NS5RqBaAcbFwdPslpAPLm3hsnx9vA/Zkj/K7u1mroApvmzIxM/19wVJRH+MhsFqvhQ== X-Received: by 2002:a05:6214:2485:b0:6b5:4865:948e with SMTP id 6a1803df08f44-6b5ed005361mr21851466d6.32.1720106877728; Thu, 04 Jul 2024 08:27:57 -0700 (PDT) Original-Received: from smtpclient.apple (cm-24-53-187-34.buckeyecom.net. [24.53.187.34]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b59e368b6esm65324966d6.15.2024.07.04.08.27.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2024 08:27:56 -0700 (PDT) In-Reply-To: <86msmxafog.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288374 Archived-At: --Apple-Mail=_44515253-DC03-4933-9260-26CB75A7BFBE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 4, 2024, at 1:29=E2=80=AFAM, Eli Zaretskii = wrote: >>=20 >> Here's a comparison among: >>=20 >> - the current seconds-to-string >> - mastodon-tl--human-duration >> - mastodon with a 3600s resolution >> - mastodon with 1yr "resolution" >> - the new seconds-to-string with option READABLE=3Dt >> - new seconds-to-string with abbreviated units and half unit = resolution >=20 > Basically, this shows that: >=20 > . mastodon truncates where seconds-to-string rounds I definitely think rounding makes more sense for a readable unit; = consider 2.98y. > . seconds-to-string lacks the "1 hour 11 min" output format > . seconds-to-string sometimes produces inaccurate results, as in > 5.5 =3D> 5.48s > The last item worries me: can we fix this, please? The latter issue results simply from my truncation of the initial delay = column to 1 decimal digit. E.g. .45s * 2.3^3 =3D 5.47515s, so s2s has = it right. > The second item sounds like a useful feature, so maybe an optional > behavior could provide it as well? I've expanded the call format to (delay &optional readable abbrev half) = , with READABLE=3D'expanded an option to get the "1 hour 11 min" = expanded format, i.e. one larger and one smaller unit (if appropriate). = Patch below. Updated output at the same delays for the various new options (r: = readable, e: readable=3Dexpanded, a: abbrev, h: half): Delay (s) s2s s2s-r s2s-ra s2s-rah = s2s-e s2s-ea s2s-eah 0.45 450.00ms 0 seconds 0s =C2=BDs 0 = seconds 0s =C2=BDs 1.03 1.03s 1 second 1s 1s 1 = second 1s 1s 2.38 2.38s 2 seconds 2s 2=C2=BDs 2 = seconds 2s 2=C2=BDs 5.48 5.48s 5 seconds 5s 5=C2=BDs 5 = seconds 5s 5=C2=BDs 12.59 12.59s 13 seconds 13s 12=C2=BDs 13 = seconds 13s 12=C2=BDs 28.96 28.96s 29 seconds 29s 29s 29 = seconds 29s 29s 66.62 66.62s 1 minute 1m 1m 1 minute 7 = seconds 1m 7s 1m 6=C2=BDs 153.22 2.55m 3 minutes 3m 2=C2=BDm 2 minutes 33 = seconds 2m 33s 2m 33s 352.40 5.87m 6 minutes 6m 6m 5 minutes 52 = seconds 5m 52s 5m 52=C2=BDs 810.52 13.51m 14 minutes 14m 13=C2=BDm 13 minutes 31 = seconds 13m 31s 13m 30=C2=BDs 1864.19 31.07m 31 minutes 31m 31m 31 minutes 4 = seconds 31m 4s 31m 4s 4287.64 71.46m 1 hour 1h 1h 1 hour 11 = minutes 1h 11m 1h 11=C2=BDm 9861.58 2.74h 3 hours 3h 2=C2=BDh 2 hours 44 = minutes 2h 44m 2h 44=C2=BDm 22681.64 6.30h 6 hours 6h 6=C2=BDh 6 hours 18 = minutes 6h 18m 6h 18m 52167.76 14.49h 14 hours 14h 14=C2=BDh 14 hours 29 = minutes 14h 29m 14h 29=C2=BDm 119985.86 1.39d 1 day 1d 1=C2=BDd 1 day = 9 hours 1d 9h 1d 9=C2=BDh 275967.47 3.19d 3 days 3d 3d 3 days 5 = hours 3d 5h 3d 4=C2=BDh 634725.18 7.35d 1 week 1w 1w 7 = days 7d 1w =C2=BDd 1459867.91 16.90d 2 weeks 2w 2=C2=BDw 2 = weeks 3 days 2w 3d 2w 3d 3357696.19 38.86d 1 month 1M 1=C2=BDM 1 = month 1 week 1M 1w 1M 1w 7722701.24 89.38d 3 months 3M 3M 2 months 4 = weeks 2M 4w 2M 4w 17762212.85 205.58d 7 months 7M 7M 6 months 3 = weeks 6M 3w 6M 3=C2=BDw 40853089.56 1.29y 1 year 1Y 1=C2=BDY 1 year = 4 months 1Y 4M 1Y 3=C2=BDM 93962106.00 2.98y 3 years 3Y 3Y 2 years 12 = months 2Y 12M 2Y 11=C2=BDM 216112843.80 6.85y 7 years 7Y 7Y 6 years 10 = months 6Y 10M 6Y 10M 497059540.74 15.75y 16 years 16Y 16Y 15 years 9 = months 15Y 9M 15Y 9M This is produced with: (concat (format "%12s %10s %10s %6s %7s %21s %7s %s\n" "Delay (s)" "s2s" "s2s-r" "s2s-ra" "s2s-rah" "s2s-e" "s2s-ea" = "s2s-eah" ) (cl-loop for s =3D 0.45 then (* s 2.3) while (< s (* 365.25 24 3600 = 22)) concat (format "%12.2f %10s %10s %6s %7s %21s %7s %s\n" = s (seconds-to-string s) (seconds-to-string s 'readable) (seconds-to-string s 'readable 'abbrev) (seconds-to-string s 'readable 'abbrev 'half) (seconds-to-string s 'expanded) (seconds-to-string s 'expanded 'abbrev) (seconds-to-string s 'expanded 'abbrev = 'half)))) =EF=BF=BC= --Apple-Mail=_44515253-DC03-4933-9260-26CB75A7BFBE Content-Type: multipart/mixed; boundary="Apple-Mail=_B38B2BEC-FA7C-478A-BD03-EEA617C79540" --Apple-Mail=_B38B2BEC-FA7C-478A-BD03-EEA617C79540 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Jul 4, = 2024, at 1:29=E2=80=AFAM, Eli Zaretskii <eliz@gnu.org> = wrote:

Here's a comparison = among:

- the current seconds-to-string
- = mastodon-tl--human-duration
- mastodon with a 3600s resolution
- = mastodon with 1yr "resolution"
- the new seconds-to-string with = option READABLE=3Dt
- new seconds-to-string with abbreviated units = and half unit = resolution
<snip>

Basically, this shows that:

. = mastodon truncates where seconds-to-string = rounds

I definitely = think rounding makes more sense for a readable unit; consider = 2.98y.

. seconds-to-string = lacks the "1 hour 11 min" output = format
. = seconds-to-string sometimes produces inaccurate results, as in
=   5.5 =3D> = 5.48s
The = last item worries me: can we fix this, = please?

The latter issue results simply = from my truncation of the initial delay column to 1 decimal digit. =  E.g. .45s * 2.3^3 =3D 5.47515s, so s2s has it = right.

The second item = sounds like a useful feature, so maybe an optional
behavior could = provide it as well?

I've = expanded the call format to (delay &optional readable abbrev half) , = with READABLE=3D'expanded an option to get the "1 hour 11 min" expanded = format, i.e. one larger and one smaller unit (if appropriate). =  Patch below.

Updated output at the same = delays for the various new options (r: readable, e: readable=3Dexpanded, = a: abbrev, h: half):

  =  Delay (s)        s2s       = s2s-r  s2s-ra  s2s-rah           =        s2s-e   s2s-ea =  s2s-eah
    =     0.45   450.00ms   0 seconds     =  0s       =C2=BDs           =    0 seconds       0s =  =C2=BDs
    =     1.03      1.03s    1 second =      1s       1s       =         1 second       1s =  1s
    =     2.38      2.38s   2 seconds   =    2s      2=C2=BDs         =      2 seconds       2s =  2=C2=BDs
    =     5.48      5.48s   5 seconds   =    5s      5=C2=BDs         =      5 seconds       5s =  5=C2=BDs
    =    12.59     12.59s  13 seconds     = 13s     12=C2=BDs             13 = seconds      13s  12=C2=BDs
       28.96     = 28.96s  29 seconds     29s      29s   =           29 seconds      29s =  29s
    =    66.62     66.62s    1 minute   =    1m       1m     1 minute 7 seconds =    1m 7s  1m 6=C2=BDs
      153.22      2.55m   3 = minutes      3m      2=C2=BDm   2 = minutes 33 seconds   2m 33s  2m 33s
      352.40     =  5.87m   6 minutes      6m       = 6m   5 minutes 52 seconds   5m 52s  5m = 52=C2=BDs
    =   810.52     13.51m  14 minutes     14m =     13=C2=BDm  13 minutes 31 seconds  13m 31s =  13m 30=C2=BDs
  =    1864.19     31.07m  31 minutes     = 31m      31m   31 minutes 4 seconds   31m 4s =  31m 4s
    =  4287.64     71.46m      1 hour   =    1h       1h      1 hour 11 = minutes   1h 11m  1h 11=C2=BDm
     9861.58     =  2.74h     3 hours      3h     =  2=C2=BDh     2 hours 44 minutes   2h 44m  2h = 44=C2=BDm
    = 22681.64      6.30h     6 hours     =  6h      6=C2=BDh     6 hours 18 minutes =   6h 18m  6h 18m
    52167.76     14.49h    14 hours =     14h     14=C2=BDh    14 hours 29 = minutes  14h 29m  14h 29=C2=BDm
   119985.86      1.39d =       1 day      1d     =  1=C2=BDd          1 day 9 hours   =  1d 9h  1d 9=C2=BDh
   275967.47      3.19d     =  3 days      3d       3d   =       3 days 5 hours    3d 5h  3d = 4=C2=BDh
  =  634725.18      7.35d      1 week =      1w       1w       =           7 days       7d =  1w =C2=BDd
  = 1459867.91     16.90d     2 weeks     =  2w      2=C2=BDw         2 = weeks 3 days    2w 3d  2w 3d
  3357696.19     38.86d   =   1 month      1M      1=C2=BDM =         1 month 1 week    1M 1w  1M = 1w
  7722701.24   =   89.38d    3 months      3M     =   3M       2 months 4 weeks    2M 4w =  2M 4w
 17762212.85    205.58d    7 months =      7M       7M       6 = months 3 weeks    6M 3w  6M 3=C2=BDw
 40853089.56      1.29y   =    1 year      1Y      1=C2=BDY =        1 year 4 months    1Y 4M  1Y = 3=C2=BDM
 93962106.00 =      2.98y     3 years      3Y =       3Y      2 years 12 months   2Y = 12M  2Y 11=C2=BDM
216112843.80      6.85y     7 years =      7Y       7Y      6 = years 10 months   6Y 10M  6Y 10M
497059540.74     15.75y    16 = years     16Y      16Y      15 = years 9 months   15Y 9M  15Y 9M

This is produced = with:

(concat
 (format = "%12s %10s  %10s  %6s  %7s  %21s  %7s =  %s\n"
    =      "Delay (s)" "s2s" "s2s-r" "s2s-ra" "s2s-rah" "s2s-e" = "s2s-ea" "s2s-eah" )
 (cl-loop for s =3D 0.45 then (* s 2.3) while (< s (* = 365.25 24 3600 22))
  =         concat (format "%12.2f %10s  %10s =  %6s  %7s  %21s  %7s  %s\n" = s
      =                   =  (seconds-to-string s)
                  =        (seconds-to-string s = 'readable)
    =                     =  (seconds-to-string s 'readable 'abbrev)
              =            (seconds-to-string s 'readable = 'abbrev 'half)
    =                     =  (seconds-to-string s 'expanded)
              =            (seconds-to-string s 'expanded = 'abbrev)
    =                     =  (seconds-to-string s 'expanded 'abbrev = 'half))))

= --Apple-Mail=_B38B2BEC-FA7C-478A-BD03-EEA617C79540 Content-Disposition: attachment; filename=time-data-readable-seconds-2.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="time-data-readable-seconds-2.patch" Content-Transfer-Encoding: quoted-printable ---=20time-date.el=092024-06-22=2021:51:21=0A+++=20time-date_new.el=09= 2024-07-04=2011:16:22=0A@@=20-406,10=20+406,62=20@@=0A=20=20=20=20=20=20=20= =20=20(list=20(*=203600=2024=20400)=20"d"=20(*=203600.0=2024.0))=0A=20=20= =20=20=20=20=20=20=20(list=20nil=20"y"=20(*=20365.25=2024=203600)))=0A=20= =20=20"Formatting=20used=20by=20the=20function=20`seconds-to-string'.")=0A= +=0A+(defvar=20seconds-to-string-readable=0A+=20=20`(("Y"=20"year"=20=20=20= "years"=20=20=20,(round=20(*=2060=2060=2024=20365.2425)))=0A+=20=20=20=20= ("M"=20"month"=20=20"months"=20=20,(round=20(*=2060=2060=2024=20= 30.436875)))=0A+=20=20=20=20("w"=20"week"=20=20=20"weeks"=20=20=20,(*=20= 60=2060=2024=207))=0A+=20=20=20=20("d"=20"day"=20=20=20=20"days"=20=20=20= =20,(*=2060=2060=2024))=0A+=20=20=20=20("h"=20"hour"=20=20=20"hours"=20=20= =20,(*=2060=2060))=0A+=20=20=20=20("m"=20"minute"=20"minutes"=2060)=0A+=20= =20=20=20("s"=20"second"=20"seconds"=201))=0A+=20=20"Formatting=20used=20= by=20the=20function=20`seconds-to-string'=20with=20READABLE=20set.")=0A+=0A= =20;;;###autoload=0A-(defun=20seconds-to-string=20(delay)=0A-=20=20= "Convert=20the=20time=20interval=20in=20seconds=20to=20a=20short=20= string."=0A-=20=20(cond=20((>=200=20delay)=20(concat=20"-"=20= (seconds-to-string=20(-=20delay))))=0A+(defun=20seconds-to-string=20= (delay=20&optional=20readable=20abbrev=20half)=0A+=20=20"Convert=20time=20= interval=20DELAY=20(in=20seconds)=20to=20a=20short=20string.=0A+By=20= default,=20the=20returned=20string=20has=20two=20decimal=20precision=20= in=20the=0A+smallest=20unit=20that=20is=20larger=20than=20DELAY=20from=20= the=20variable=0A+`seconds-to-string'.=20=20If=20READABLE=20is=20= non-nil,=20convert=20DELAY=20into=0A+a=20readable=20string,=20using=20= the=20information=20in=20the=20variable=0A+`seconds-to-string-readable'.=20= =20If=20it=20is=20the=20symbol=20`expanded',=0A+use=20two=20units=20to=20= describe=20DELAY,=20if=20appropriate.=20=20E.g.=20\"1=20hour=0A+32=20= minutes\".=20=20If=20ABBREV=20is=20non-nil,=20abbreviate=20the=20= readable=0A+units.=20=20If=20HALF=20is=20non-nil,=20round=20the=20= smallest=20unit=20displayed=20to=0A+the=20nearest=20half=20unit."=0A+=20=20= (cond=20((>=200=20delay)=20(concat=20"-"=20(seconds-to-string=20(-=20= delay)=20readable=20half)))=0A+=20=20=20=20=20=20=20=20(readable=0A+=20=20= =20=20=20=20=20=20=20(let*=20((stsa=20seconds-to-string-readable)=0A+=09=09= (expanded=20(eq=20readable=20'expanded))=0A+=09=09(round-to=20(if=20half=20= 0.5=201))=0A+=09=09(padding=20(if=20abbrev=20""=20"=20"))=0A+=09=09here=20= cnt=20cnt-pre=20here-pre)=0A+=09=20=20=20(if=20(=3D=20(round=20delay=20= round-to)=200)=0A+=09=20=20=20=20=20=20=20(format=20"0%s"=20(if=20abbrev=20= "s"=20"=20seconds"))=0A+=09=20=20=20=20=20(while=20(and=20(setq=20here=20= (pop=20stsa))=20stsa=0A+=09=09=09=20(<=20(/=20delay=20(nth=203=20here))=20= 1)))=0A+=09=20=20=20=20=20(or=20(and=20expanded=20stsa=0A+=09=09=20=20=20= =20=20=20(progn=0A+=09=09=09(setq=20here-pre=20here=20here=20(car=20= stsa)=0A+=09=09=09=20=20=20=20=20=20cnt-pre=20(floor=20(/=20(float=20= delay)=20(nth=203=20here-pre)))=0A+=09=09=09=20=20=20=20=20=20cnt=20= (round=20(/=20(-=20(float=20delay)=20(*=20cnt-pre=20(nth=203=20= here-pre)))=0A+=09=09=09=09=09=20=20=20=20(nth=203=20here))=0A+=09=09=09=09= =09=20round-to))=0A+=09=09=09(if=20(>=20cnt=200)=20t=20(setq=20here-pre=20= nil))))=0A+=09=20=20=20=20=20=20=20(setq=20cnt=20(round=20(/=20(float=20= delay)=20(nth=203=20here))=20round-to)))=0A+=09=20=20=20=20=20(cl-labels=0A= +=09=09=20((unit=20(cnt=20here=20&optional=20half)=0A+=09=09=20=20=20=20= (cond=20(abbrev=20(car=20here))=0A+=09=09=09=20=20((<=3D=20cnt=20(if=20= half=202=201))=20(nth=201=20here))=0A+=09=09=09=20=20(t=20(nth=202=20= here)))))=0A+=09=20=20=20=20=20=20=20(concat=0A+=09=09(when=20here-pre=0A= +=09=09=20=20(concat=20(number-to-string=20cnt-pre)=20padding=0A+=09=09=09= =20=20(unit=20cnt-pre=20here-pre)=20"=20"))=0A+=09=09(let=20((c=20(if=20= half=20(/=20cnt=202)=20cnt)))=0A+=09=09=20=20(if=20(>=20c=200)=20= (number-to-string=20c)=20""))=0A+=09=09(if=20(and=20half=20(=3D=20(mod=20= cnt=202)=201))=20"=C2=BD"=20"")=0A+=09=09padding=20(unit=20cnt=20here=20= half))))))=0A=20=20=20=20=20=20=20=20=20((=3D=200=20delay)=20"0s")=0A=20=20= =20=20=20=20=20=20=20(t=20(let=20((sts=20seconds-to-string)=20here)=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(while=20(and=20(car=20(setq=20= here=20(pop=20sts)))=0A= --Apple-Mail=_B38B2BEC-FA7C-478A-BD03-EEA617C79540 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_B38B2BEC-FA7C-478A-BD03-EEA617C79540-- --Apple-Mail=_44515253-DC03-4933-9260-26CB75A7BFBE--