changeset 72515:ac466a3d6da6

(Fcurrent_idle_time): Simplify.
author Kim F. Storm <storm@cua.dk>
date Fri, 25 Aug 2006 10:05:50 +0000
parents 328d2b5c74fb
children aba79a1f03ed
files src/keyboard.c
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Aug 25 10:05:41 2006 +0000
+++ b/src/keyboard.c	Fri Aug 25 10:05:50 2006 +0000
@@ -4570,19 +4570,16 @@
 resolution finer than a second.  */)
   ()
 {
-  EMACS_TIME now, idleness_now;
-  Lisp_Object result[3];
-
-  EMACS_GET_TIME (now);
   if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
     {
+      EMACS_TIME now, idleness_now;
+
+      EMACS_GET_TIME (now);
       EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time);
 
-      XSETINT (result[0], (EMACS_SECS (idleness_now) >> 16) & 0xffff);
-      XSETINT (result[1], (EMACS_SECS (idleness_now) >> 0)  & 0xffff);
-      XSETINT (result[2], EMACS_USECS (idleness_now));
-
-      return Flist (3, result);
+      return list3 (make_number ((EMACS_SECS (idleness_now) >> 16) & 0xffff),
+		    make_number ((EMACS_SECS (idleness_now) >> 0)  & 0xffff),
+		    make_number (EMACS_USECS (idleness_now)));
     }
 
   return Qnil;