aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert2012-06-22 14:17:42 -0700
committerPaul Eggert2012-06-22 14:17:42 -0700
commitd35af63cd671563fd188c3b0a1ef30067027c7aa (patch)
treec9e01847ccf788e23794684da9331c3e0defd0d3 /src/lread.c
parentf143bfe38b43ad0a9d817f05c25e418982dca06f (diff)
downloademacs-d35af63cd671563fd188c3b0a1ef30067027c7aa.tar.gz
emacs-d35af63cd671563fd188c3b0a1ef30067027c7aa.zip
Support higher-resolution time stamps.
Fixes: debbugs:9000
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lread.c b/src/lread.c
index 96868c2da89..fee97044a73 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -601,17 +601,9 @@ read_filtered_event (int no_switch_frame, int ascii_required,
601 /* Compute timeout. */ 601 /* Compute timeout. */
602 if (NUMBERP (seconds)) 602 if (NUMBERP (seconds))
603 { 603 {
604 EMACS_TIME wait_time;
605 int sec, usec;
606 double duration = extract_float (seconds); 604 double duration = extract_float (seconds);
607 605 EMACS_TIME wait_time = EMACS_TIME_FROM_DOUBLE (duration);
608 if (0 < duration)
609 duration_to_sec_usec (duration, &sec, &usec);
610 else
611 sec = usec = 0;
612
613 EMACS_GET_TIME (end_time); 606 EMACS_GET_TIME (end_time);
614 EMACS_SET_SECS_USECS (wait_time, sec, usec);
615 EMACS_ADD_TIME (end_time, end_time, wait_time); 607 EMACS_ADD_TIME (end_time, end_time, wait_time);
616 } 608 }
617 609