Completed sys/select.h, renamed the howmany() macro to _howmany() - now
also contains the pselect() prototype. Added new header file sys/time.h. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1736 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#ifndef _SYS_TIME_H
|
||||
#define _SYS_TIME_H
|
||||
/*
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
struct timeval {
|
||||
time_t tv_sec;
|
||||
suseconds_t tv_usec;
|
||||
};
|
||||
|
||||
#include <sys/select.h>
|
||||
/* circular dependency: fd_set needs to be defined and the
|
||||
* select prototype exported by this file, but <sys/select.h>
|
||||
* needs struct timeval.
|
||||
*/
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
|
||||
struct itimerval {
|
||||
struct timeval it_interval;
|
||||
struct timeval it_value;
|
||||
};
|
||||
|
||||
#define ITIMER_REAL 1 /* real time */
|
||||
#define ITIMER_VIRTUAL 2 /* process virtual time */
|
||||
#define ITIMER_PROF 3 /* both */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int getitimer(int which, struct itimerval *value);
|
||||
extern int setitimer(int which, const struct itimerval *value, struct itimerval *oldValue);
|
||||
extern int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
|
||||
extern int utimes(const char *name, const struct timeval times[2]);
|
||||
/* legacy */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_TIME_H */
|
||||
Reference in New Issue
Block a user