From 03360f3bb77ceeabeae0ec867ffef49e578fd0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 29 Oct 2002 00:46:31 +0000 Subject: [PATCH] Added our versions of BeOS compatible sys/timeb.h, and sys/times.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1741 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/sys/timeb.h | 26 ++++++++++++++++++++++++++ headers/posix/sys/times.h | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 headers/posix/sys/timeb.h create mode 100644 headers/posix/sys/times.h diff --git a/headers/posix/sys/timeb.h b/headers/posix/sys/timeb.h new file mode 100644 index 0000000000..0ba9e726c9 --- /dev/null +++ b/headers/posix/sys/timeb.h @@ -0,0 +1,26 @@ +#ifndef _SYS_TIMEB_H +#define _SYS_TIMEB_H +/* +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include + + +struct timeb { + time_t time; /* seconds of current time */ + unsigned short millitm; /* milliseconds of current time */ + short timezone; /* timezone difference to GMT in minutes */ + short dstflag; /* daylight saving flag */ +}; + + +extern +#ifdef __cplusplus +"C" +#endif +int ftime(struct timeb *timeb); + /* legacy */ + +#endif /* _SYS_TIMEB_H */ diff --git a/headers/posix/sys/times.h b/headers/posix/sys/times.h new file mode 100644 index 0000000000..156456e29d --- /dev/null +++ b/headers/posix/sys/times.h @@ -0,0 +1,25 @@ +#ifndef _SYS_TIMES_H +#define _SYS_TIMES_H +/* +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include + + +struct tms { + clock_t tms_utime; /* user CPU time */ + clock_t tms_stime; /* system CPU time */ + clock_t tms_cutime; /* user CPU time of terminated child processes */ + clock_t tms_cstime; /* system CPU time of terminated child processes */ +}; + + +extern +#ifdef __cplusplus +"C" +#endif +clock_t times(struct tms *tms); + +#endif /* _SYS_TIMES_H */