diff options
| author | Kim F. Storm | 2006-08-25 10:05:50 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-08-25 10:05:50 +0000 |
| commit | 966949b00f0515e586645cee56d42a14dac4f9fc (patch) | |
| tree | f7aff10bbc5e50d0ac9b80b1cbc73df379d8f05c /src | |
| parent | 16fb6ded70ae47140bb21b06da62f2f85a414019 (diff) | |
| download | emacs-966949b00f0515e586645cee56d42a14dac4f9fc.tar.gz emacs-966949b00f0515e586645cee56d42a14dac4f9fc.zip | |
(Fcurrent_idle_time): Simplify.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 0d13743f8b5..abf57937966 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4570,19 +4570,16 @@ The microsecond count is zero on systems that do not provide | |||
| 4570 | resolution finer than a second. */) | 4570 | resolution finer than a second. */) |
| 4571 | () | 4571 | () |
| 4572 | { | 4572 | { |
| 4573 | EMACS_TIME now, idleness_now; | ||
| 4574 | Lisp_Object result[3]; | ||
| 4575 | |||
| 4576 | EMACS_GET_TIME (now); | ||
| 4577 | if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) | 4573 | if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) |
| 4578 | { | 4574 | { |
| 4579 | EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time); | 4575 | EMACS_TIME now, idleness_now; |
| 4580 | 4576 | ||
| 4581 | XSETINT (result[0], (EMACS_SECS (idleness_now) >> 16) & 0xffff); | 4577 | EMACS_GET_TIME (now); |
| 4582 | XSETINT (result[1], (EMACS_SECS (idleness_now) >> 0) & 0xffff); | 4578 | EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time); |
| 4583 | XSETINT (result[2], EMACS_USECS (idleness_now)); | ||
| 4584 | 4579 | ||
| 4585 | return Flist (3, result); | 4580 | return list3 (make_number ((EMACS_SECS (idleness_now) >> 16) & 0xffff), |
| 4581 | make_number ((EMACS_SECS (idleness_now) >> 0) & 0xffff), | ||
| 4582 | make_number (EMACS_USECS (idleness_now))); | ||
| 4586 | } | 4583 | } |
| 4587 | 4584 | ||
| 4588 | return Qnil; | 4585 | return Qnil; |