diff options
author | Kim F. Storm <storm@cua.dk> | 2006-08-25 23:33:30 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-08-25 23:33:30 +0000 |
commit | 799734b06388430cca13e5933fa57d782b7b1435 (patch) | |
tree | 6256fc610a3c6986dc203011515950069369dd59 /src/editfns.c | |
parent | a9f2aeaeed9c9135c27e5abce0051b30d1467089 (diff) | |
download | emacs-799734b06388430cca13e5933fa57d782b7b1435.tar.gz emacs-799734b06388430cca13e5933fa57d782b7b1435.tar.bz2 emacs-799734b06388430cca13e5933fa57d782b7b1435.zip |
(Fcurrent_time, Fget_internal_run_time): Simplify; use list3.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/editfns.c b/src/editfns.c index 8ac61f3d006..c43528c4863 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1435,14 +1435,11 @@ resolution finer than a second. */) () { EMACS_TIME t; - Lisp_Object result[3]; EMACS_GET_TIME (t); - XSETINT (result[0], (EMACS_SECS (t) >> 16) & 0xffff); - XSETINT (result[1], (EMACS_SECS (t) >> 0) & 0xffff); - XSETINT (result[2], EMACS_USECS (t)); - - return Flist (3, result); + return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff), + make_number ((EMACS_SECS (t) >> 0) & 0xffff), + make_number (EMACS_USECS (t))); } DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, @@ -1460,7 +1457,6 @@ systems that do not provide resolution finer than a second. */) { #ifdef HAVE_GETRUSAGE struct rusage usage; - Lisp_Object result[3]; int secs, usecs; if (getrusage (RUSAGE_SELF, &usage) < 0) @@ -1476,11 +1472,9 @@ systems that do not provide resolution finer than a second. */) secs++; } - XSETINT (result[0], (secs >> 16) & 0xffff); - XSETINT (result[1], (secs >> 0) & 0xffff); - XSETINT (result[2], usecs); - - return Flist (3, result); + return list3 (make_number ((secs >> 16) & 0xffff), + make_number ((secs >> 0) & 0xffff), + make_number (usecs)); #else return Fcurrent_time (); #endif |