[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c,v |
Date: |
Sun, 20 Aug 2006 12:06:21 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/08/20 12:06:20
Index: keyboard.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v
retrieving revision 1.868
retrieving revision 1.869
diff -u -b -r1.868 -r1.869
--- keyboard.c 15 Aug 2006 17:39:21 -0000 1.868
+++ keyboard.c 20 Aug 2006 12:06:20 -0000 1.869
@@ -4544,6 +4544,35 @@
return nexttime;
}
+DEFUN ("current-idle-time", Fcurrent_idle_time, Scurrent_idle_time, 0, 0, 0,
+ /* Return the current length of Emacs idleness.
+The value is returned as a list of three integers. The first has the
+most significant 16 bits of the seconds, while the second has the
+least significant 16 bits. The third integer gives the microsecond
+count.
+
+The microsecond count is zero on systems that do not provide
+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_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 Qnil;
+}
+
/* Caches for modify_event_symbol. */
static Lisp_Object accent_key_syms;
static Lisp_Object func_key_syms;
@@ -11131,6 +11160,7 @@
menu_bar_items_vector = Qnil;
staticpro (&menu_bar_items_vector);
+ defsubr (&Scurrent_idle_time);
defsubr (&Sevent_convert_list);
defsubr (&Sread_key_sequence);
defsubr (&Sread_key_sequence_vector);
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Chong Yidong, 2006/08/04
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Eli Zaretskii, 2006/08/05
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Richard M. Stallman, 2006/08/09
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Jan Djärv, 2006/08/10
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Chong Yidong, 2006/08/14
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Chong Yidong, 2006/08/15
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Chong Yidong, 2006/08/20
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Kenichi Handa, 2006/08/20
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Jan Djärv, 2006/08/21
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Kim F. Storm, 2006/08/25
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, YAMAMOTO Mitsuharu, 2006/08/27