ReactOS 0.4.16-dev-91-g764881a
time.h File Reference
#include <schily/mconfig.h>
#include <schily/types.h>
#include <time.h>
Include dependency graph for time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  timeval
 
struct  timezone
 
struct  timespec
 

Macros

#define _INCL_TIME_H
 
#define timerclear(tvp)   (tvp)->tv_sec = (tvp)->tv_usec = 0
 
#define timerfix1(tvp)
 
#define timerfix2(tvp)
 
#define timerfix(tvp)   do { timerfix1(tvp); timerfix2(tvp); } while (0)
 
#define timersub(tvp1, tvp2)
 
#define timeradd(tvp1, tvp2)
 
#define timespecclear(tsp)   (tsp)->tv_sec = (tsp)->tv_nsec = 0
 
#define timespecfix1(tsp)
 
#define timespecfix2(tsp)
 
#define timespecfix(tsp)   do { timespecfix1(tsp); timespecfix2(tsp); } while (0)
 
#define timespecsub(tsp1, tsp2)
 
#define timespecadd(tsp1, tsp2)
 

Macro Definition Documentation

◆ _INCL_TIME_H

#define _INCL_TIME_H

Definition at line 52 of file time.h.

◆ timeradd

#define timeradd (   tvp1,
  tvp2 
)
Value:
do { \
(tvp1)->tv_sec += (tvp2)->tv_sec; \
(tvp1)->tv_usec += (tvp2)->tv_usec; \
timerfix1(tvp1); timerfix2(tvp1); \
} while (0)
#define timerfix2(tvp)
Definition: time.h:104

Definition at line 123 of file time.h.

◆ timerclear

#define timerclear (   tvp)    (tvp)->tv_sec = (tvp)->tv_usec = 0

Definition at line 96 of file time.h.

◆ timerfix

#define timerfix (   tvp)    do { timerfix1(tvp); timerfix2(tvp); } while (0)

Definition at line 109 of file time.h.

◆ timerfix1

#define timerfix1 (   tvp)
Value:
while ((tvp)->tv_usec < 0) { \
(tvp)->tv_sec--; \
(tvp)->tv_usec += 1000000; \
}

Definition at line 99 of file time.h.

◆ timerfix2

#define timerfix2 (   tvp)
Value:
while ((tvp)->tv_usec > 1000000) { \
(tvp)->tv_sec++; \
(tvp)->tv_usec -= 1000000; \
}

Definition at line 104 of file time.h.

◆ timersub

#define timersub (   tvp1,
  tvp2 
)
Value:
do { \
(tvp1)->tv_sec -= (tvp2)->tv_sec; \
(tvp1)->tv_usec -= (tvp2)->tv_usec; \
timerfix1(tvp1); timerfix2(tvp1); \
} while (0)

Definition at line 116 of file time.h.

◆ timespecadd

#define timespecadd (   tsp1,
  tsp2 
)
Value:
do { \
(tsp1)->tv_sec += (tsp2)->tv_sec; \
(tsp1)->tv_nsec += (tsp2)->tv_nsec; \
timespecfix1(tsp1); timespecfix2(tsp1); \
} while (0)
#define timespecfix2(tsp)
Definition: time.h:139

Definition at line 154 of file time.h.

◆ timespecclear

#define timespecclear (   tsp)    (tsp)->tv_sec = (tsp)->tv_nsec = 0

Definition at line 131 of file time.h.

◆ timespecfix

#define timespecfix (   tsp)    do { timespecfix1(tsp); timespecfix2(tsp); } while (0)

Definition at line 144 of file time.h.

◆ timespecfix1

#define timespecfix1 (   tsp)
Value:
while ((tsp)->tv_nsec < 0) { \
(tsp)->tv_sec--; \
(tsp)->tv_nsec += 1000000000; \
}

Definition at line 134 of file time.h.

◆ timespecfix2

#define timespecfix2 (   tsp)
Value:
while ((tsp)->tv_nsec > 1000000000) { \
(tsp)->tv_sec++; \
(tsp)->tv_nsec -= 1000000000; \
}

Definition at line 139 of file time.h.

◆ timespecsub

#define timespecsub (   tsp1,
  tsp2 
)
Value:
do { \
(tsp1)->tv_sec -= (tsp2)->tv_sec; \
(tsp1)->tv_nsec -= (tsp2)->tv_nsec; \
timespecfix1(tsp1); timespecfix2(tsp1); \
} while (0)

Definition at line 147 of file time.h.