[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elegant way to time function execution
From: |
Taylan Ulrich Bayırlı/Kammer |
Subject: |
Re: Elegant way to time function execution |
Date: |
Sun, 04 Sep 2016 13:35:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Nala Ginrut <address@hidden> writes:
> You may try time-utc->date or it's friends to convert seconds to
> Y/M/D/h/m/s. But you may need to write a function to print each field.
> BTW, ",a" command in the REPL is your friend when you have no any clue
> about what function may work.
Reading SRFI 19, I can't be sure, but I suspect that it's supposed to be
an error to use a "time-utc->..." procedure on a time object with type
"time-duration".
The easiest way to make a time-duration type of time object readable
that I can see is turning it into plain seconds via:
(+ (time-second t)
(/ (time-nanosecond t) 1000000000))
Taylan