time.h

00001 /* Locks
00002    Copyright (C) 2000 Free Software Foundation, Inc.
00003    Written by Stephane Carrez (stcarrez@worldnet.fr)    
00004 
00005 This file is free software; you can redistribute it and/or modify it
00006 under the terms of the GNU General Public License as published by the
00007 Free Software Foundation; either version 2, or (at your option) any
00008 later version.
00009 
00010 In addition to the permissions in the GNU General Public License, the
00011 Free Software Foundation gives you unlimited permission to link the
00012 compiled version of this file with other programs, and to distribute
00013 those programs without any restriction coming from the use of this
00014 file.  (The General Public License restrictions do apply in other
00015 respects; for example, they cover modification of the file, and
00016 distribution when not linked into another program.)
00017 
00018 This file is distributed in the hope that it will be useful, but
00019 WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021 General Public License for more details.
00022 
00023 You should have received a copy of the GNU General Public License
00024 along with this program; see the file COPYING.  If not, write to
00025 the Free Software Foundation, 59 Temple Place - Suite 330,
00026 Boston, MA 02111-1307, USA.  */
00027 
00028 #ifndef _TIME_H
00029 #define _TIME_H
00030 
00031 
00032 #include <sys/param.h>
00033 
00034 struct tm
00035 {
00036   int tm_sec;                   /* Seconds.     [0-60] (1 leap second) */
00037   int tm_min;                   /* Minutes.     [0-59] */
00038   int tm_hour;                  /* Hours.       [0-23] */
00039   int tm_mday;                  /* Day.         [1-31] */
00040   int tm_mon;                   /* Month.       [0-11] */
00041   int tm_year;                  /* Year - 1900.  */
00042   int tm_wday;                  /* Day of week. [0-6] */
00043   int tm_yday;                  /* Days in year.[0-365] */
00044   int tm_isdst;                 /* DST.         [-1/0/1]*/
00045 
00046   int tm_mon_length;
00047   int tm_year_length;
00048 };
00049 
00050 typedef unsigned long time_t;
00051 
00052 /* Return the current time and put it in *TIMER if TIMER is not NULL.  */
00053 extern time_t time(time_t *__timer);
00054 
00055 /* Return the `struct tm' representation of *TIMER in local time,
00056    using *TP to store the result.  */
00057 extern struct tm *localtime_r(const time_t * __timer,
00058                               struct tm * __tp);
00059 
00060 extern void udelay (unsigned long usec);
00061 
00062 #endif