Authors: Reinhard Grafl
- $Id: logging.c 1107 2004-05-28 12:18:44Z twisti $
+ $Id: logging.c 1245 2004-06-30 20:15:25Z twisti $
*/
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include "global.h"
#include "tables.h"
}
-/********************** Function: getcputime ********************************
-
- Returns the used CPU time in microseconds
-
-****************************************************************************/
-
-s8 getcputime()
-{
- struct rusage ru;
- int sec, usec;
-
- getrusage(RUSAGE_SELF, &ru);
- sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
- usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
-
- return sec * 1000000 + usec;
-}
-
-
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where
Authors: Reinhard Grafl
- $Id: logging.h 1086 2004-05-26 21:22:05Z twisti $
+ $Id: logging.h 1245 2004-06-30 20:15:25Z twisti $
*/
FILE *get_logfile(); /* return the current logfile */
-s8 getcputime();
-
#endif /* _LOGGING_H */
Authors: Reinhard Grafl
- $Id: logging.c 1107 2004-05-28 12:18:44Z twisti $
+ $Id: logging.c 1245 2004-06-30 20:15:25Z twisti $
*/
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include "global.h"
#include "tables.h"
}
-/********************** Function: getcputime ********************************
-
- Returns the used CPU time in microseconds
-
-****************************************************************************/
-
-s8 getcputime()
-{
- struct rusage ru;
- int sec, usec;
-
- getrusage(RUSAGE_SELF, &ru);
- sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
- usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
-
- return sec * 1000000 + usec;
-}
-
-
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where
Authors: Reinhard Grafl
- $Id: logging.h 1086 2004-05-26 21:22:05Z twisti $
+ $Id: logging.h 1245 2004-06-30 20:15:25Z twisti $
*/
FILE *get_logfile(); /* return the current logfile */
-s8 getcputime();
-
#endif /* _LOGGING_H */