The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/time.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /* The <time.h> header is used by the procedures that deal with time.
    2  * Handling time is surprisingly complicated, what with GMT, local time
    3  * and other factors.  Although the Bishop of Ussher (1581-1656) once
    4  * calculated that based on the Bible, the world began on 12 Oct. 4004 BC
    5  * at 9 o'clock in the morning, in the UNIX world time begins at midnight, 
    6  * 1 Jan. 1970 GMT.  Before that, all was NULL and (void).
    7  */
    8 
    9 #ifndef _TIME_H
   10 #define _TIME_H
   11 
   12 #define CLOCKS_PER_SEC    60    /* MINIX always uses 60 Hz, even in Europe */
   13 
   14 #ifdef _POSIX_SOURCE
   15 #define CLK_TCK CLOCKS_PER_SEC  /* obsolescent mame for CLOCKS_PER_SEC */
   16 #endif
   17 
   18 #define NULL    ((void *)0)
   19 
   20 #ifndef _SIZE_T
   21 #define _SIZE_T
   22 typedef unsigned int size_t;
   23 #endif
   24 
   25 #ifndef _TIME_T
   26 #define _TIME_T
   27 typedef long time_t;            /* time in sec since 1 Jan 1970 0000 GMT */
   28 #endif
   29 
   30 #ifndef _CLOCK_T
   31 #define _CLOCK_T
   32 typedef long clock_t;           /* time in ticks since process started */
   33 #endif
   34 
   35 struct tm {
   36   int tm_sec;                   /* seconds after the minute [0, 59] */
   37   int tm_min;                   /* minutes after the hour [0, 59] */
   38   int tm_hour;                  /* hours since midnight [0, 23] */
   39   int tm_mday;                  /* day of the month [1, 31] */
   40   int tm_mon;                   /* months since January [0, 11] */
   41   int tm_year;                  /* years since 1900 */
   42   int tm_wday;                  /* days since Sunday [0, 6] */
   43   int tm_yday;                  /* days since January 1 [0, 365] */
   44   int tm_isdst;                 /* Daylight Saving Time flag */
   45 };
   46 
   47 extern char *tzname[];
   48 
   49 /* Function Prototypes. */
   50 #ifndef _ANSI_H
   51 #include <ansi.h>
   52 #endif
   53 
   54 _PROTOTYPE( clock_t clock, (void)                                       );
   55 _PROTOTYPE( double difftime, (time_t _time1, time_t _time0)             );
   56 _PROTOTYPE( time_t mktime, (struct tm *_timeptr)                        );
   57 _PROTOTYPE( time_t time, (time_t *_timeptr)                             );
   58 _PROTOTYPE( char *asctime, (const struct tm *_timeptr)                  );
   59 _PROTOTYPE( char *ctime, (const time_t *_timer)                 );
   60 _PROTOTYPE( struct tm *gmtime, (const time_t *_timer)                   );
   61 _PROTOTYPE( struct tm *localtime, (const time_t *_timer)                );
   62 _PROTOTYPE( size_t strftime, (char *_s, size_t _max, const char *_fmt,
   63                                 const struct tm *_timep)                );
   64 
   65 #ifdef _POSIX_SOURCE
   66 _PROTOTYPE( void tzset, (void)                                          );
   67 #endif
   68 
   69 #ifdef _MINIX
   70 _PROTOTYPE( int stime, (time_t *_top)                                   );
   71 #endif
   72 
   73 extern long timezone;
   74 
   75 #endif /* _TIME_H */

Cache object: 0f2d76d79cff5ec79f63b935e80978ba


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.