Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 777:e65d9cf16707
[xemacs-hg @ 2002-03-15 11:00:28 by ben]
config.h.in, sysdep.c, sysfile.h, systime.h: add HAVE_SYS_TIMES_H and use it to include sys/times.h, used for
struct tms in new POSIX() function times().
mule\mule-charset.el, obsolete.el, subr.el: Put back
previously-deleted truncate-string-to-width. Move other
non-Mule-specific stuff into subr.el or obsolete.el.
configure.in: check for sys/times.h.
author | ben |
---|---|
date | Fri, 15 Mar 2002 11:00:56 +0000 |
parents | 943eaba38521 |
children | a5954632b187 |
comparison
equal
deleted
inserted
replaced
776:79940b592197 | 777:e65d9cf16707 |
---|---|
1 /* Interfaces to system-dependent kernel and library entries. | 1 /* Interfaces to system-dependent kernel and library entries. |
2 Copyright (C) 1985-1988, 1992-1995 Free Software Foundation, Inc. | 2 Copyright (C) 1985-1988, 1992-1995 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Tinker Systems. | 3 Copyright (C) 1995 Tinker Systems. |
4 Copyright (C) 2000, 2001 Ben Wing. | 4 Copyright (C) 2000, 2001, 2002 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
3484 static int | 3484 static int |
3485 get_process_times_1 (long *user_ticks, long *system_ticks) | 3485 get_process_times_1 (long *user_ticks, long *system_ticks) |
3486 { | 3486 { |
3487 #if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) | 3487 #if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) |
3488 /* We have the POSIX times() function available. */ | 3488 /* We have the POSIX times() function available. */ |
3489 /* #### Perhaps we should just use a configure test for times()? */ | |
3489 struct tms tttt; | 3490 struct tms tttt; |
3490 times (&tttt); | 3491 times (&tttt); |
3491 *user_ticks = (long) tttt.tms_utime; | 3492 *user_ticks = (long) tttt.tms_utime; |
3492 *system_ticks = (long) tttt.tms_stime; | 3493 *system_ticks = (long) tttt.tms_stime; |
3493 return 1; | 3494 return 1; |