diff options
author | Jason Rumney <[email protected]> | 2007-06-14 15:59:58 +0000 |
---|---|---|
committer | Jason Rumney <[email protected]> | 2007-06-14 15:59:58 +0000 |
commit | c433c134bce88ed6ebab53dd5e6d0af51a2c2d80 (patch) | |
tree | eadad63e14acd418450967242392276cbbf9c06a | |
parent | 74258518069d18525237fc0f3dcf33ffa3fd65e9 (diff) |
(Fget_internal_run_time) [WINDOWSNT]: Use w32_get_internal_run_time.
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/editfns.c | 13 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4342561ae5..d0efb5b46e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2007-06-14 Jason Rumney <[email protected]> + + * w32.c (get_process_times_fn): New function pointer. + (globals_of_w32): Intialize it if present in kernel32.dll. + (w32_get_internal_run_time): New function. + + * editfns.c (Fget_internal_run_time) [WINDOWSNT]: Use it. + 2007-06-14 Kenichi Handa <[email protected]> * composite.c (update_compositions): Check the validness of diff --git a/src/editfns.c b/src/editfns.c index aca3383943..5fd40ed51c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -84,6 +84,11 @@ extern char **environ; extern size_t emacs_strftimeu P_ ((char *, size_t, const char *, const struct tm *, int)); + +#ifdef WINDOWSNT +extern Lisp_Object w32_get_internal_run_time (); +#endif + static int tm_diff P_ ((struct tm *, struct tm *)); static void find_field P_ ((Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *)); static void update_buffer_properties P_ ((int, int)); @@ -1483,9 +1488,13 @@ on systems that do not provide resolution finer than a second. */) return list3 (make_number ((secs >> 16) & 0xffff), make_number ((secs >> 0) & 0xffff), make_number (usecs)); -#else +#else /* ! HAVE_GETRUSAGE */ +#if WINDOWSNT + return w32_get_internal_run_time (); +#else /* ! WINDOWSNT */ return Fcurrent_time (); -#endif +#endif /* WINDOWSNT */ +#endif /* HAVE_GETRUSAGE */ } |