emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alias time-to-seconds to float-time


From: Nathaniel Flath
Subject: alias time-to-seconds to float-time
Date: Wed, 26 Aug 2009 21:33:19 -0700

>From the time-to-seconds doc-string:
"Convert time value TIME to a floating point number.  You can use `float-time' instead."
Looking at both functions, there doesn't seem to be any difference other than float-time being implemented in C.  Should time-to-seconds just be aliased to float-time?

Patch to time-date.el:
< ;;;###autoload
< (defun time-to-seconds (time)
<   "Convert time value TIME to a floating point number.
< You can use `float-time' instead."
<   (with-decoded-time-value ((high low micro time))
<     (+ (* 1.0 high 65536)
<        low
<        (/ micro 1000000.0))))
---
> (defalias 'time-to-seconds 'float-time)

Thanks,
Nathaniel Flath

reply via email to

[Prev in Thread] Current Thread [Next in Thread]