2005-06-10 17:12:03 +02:00
|
|
|
/*
|
|
|
|
sys/time.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SYS__TIME_H
|
|
|
|
#define _SYS__TIME_H
|
|
|
|
|
2011-01-28 12:35:02 +01:00
|
|
|
#include <minix/ansi.h>
|
2005-06-10 17:12:03 +02:00
|
|
|
|
|
|
|
/* Open Group Base Specifications Issue 6 (not complete) */
|
|
|
|
struct timeval
|
|
|
|
{
|
|
|
|
long /*time_t*/ tv_sec;
|
|
|
|
long /*useconds_t*/ tv_usec;
|
|
|
|
};
|
|
|
|
|
2007-03-30 17:36:49 +02:00
|
|
|
struct timezone {
|
|
|
|
int tz_minuteswest; /* minutes west of Greenwich */
|
|
|
|
int tz_dsttime; /* type of dst correction */
|
|
|
|
};
|
|
|
|
|
2010-04-14 19:51:39 +02:00
|
|
|
/* Operations on timevals. */
|
|
|
|
#define timerclear(tp) (tp)->tv_sec = (tp)->tv_usec = 0L
|
|
|
|
#define timerisset(tp) ((tp)->tv_sec || (tp)->tv_usec)
|
|
|
|
|
2005-06-10 17:12:03 +02:00
|
|
|
int gettimeofday(struct timeval *_RESTRICT tp, void *_RESTRICT tzp);
|
|
|
|
|
|
|
|
/* Compatibility with other Unix systems */
|
|
|
|
int settimeofday(const struct timeval *tp, const void *tzp);
|
|
|
|
|
2009-08-15 18:09:32 +02:00
|
|
|
/* setitimer/getitimer interface */
|
|
|
|
struct itimerval
|
|
|
|
{
|
|
|
|
struct timeval it_interval;
|
|
|
|
struct timeval it_value;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ITIMER_REAL 0
|
|
|
|
#define ITIMER_VIRTUAL 1 /* Not implemented */
|
|
|
|
#define ITIMER_PROF 2 /* Not implemented */
|
|
|
|
|
|
|
|
int getitimer(int which, struct itimerval *value);
|
|
|
|
int setitimer(int which, const struct itimerval *_RESTRICT value,
|
|
|
|
struct itimerval *_RESTRICT ovalue);
|
|
|
|
|
2009-11-22 21:11:06 +01:00
|
|
|
#include <sys/select.h>
|
|
|
|
|
2005-06-10 17:12:03 +02:00
|
|
|
#endif /* _SYS__TIME_H */
|