all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nathaniel Flath <flat0103@gmail.com>
To: emacs-devel@gnu.org
Subject: alias time-to-seconds to float-time
Date: Wed, 26 Aug 2009 21:33:19 -0700	[thread overview]
Message-ID: <5e3a506e0908262133y5ecbff5fme2c0aa47889484ca@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 785 bytes --]

             reply	other threads:[~2009-08-27  4:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27  4:33 Nathaniel Flath [this message]
2009-09-02  3:32 ` alias time-to-seconds to float-time Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e3a506e0908262133y5ecbff5fme2c0aa47889484ca@mail.gmail.com \
    --to=flat0103@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.