hptime.h

Go to the documentation of this file.
00001 //& ****************************************************************************
00002 //&
00003 //& Written by Ingo Blank, Benjamin Maurin August 2004
00004 //&
00005 //& Copyright (C) 2004 The HP-GCC Development Team
00006 //&
00007 //& ****************************************************************************
00008 //&
00009 //&
00010 //& This file is part of HP-GCC.
00011 //&
00012 //& HP-GCC is free software; you can redistribute it and/or modify
00013 //& it under the terms of the GNU General Public License as published by
00014 //& the Free Software Foundation; either version 2, or (at your option)
00015 //& any later version.
00016 //& 
00017 //& HP-GCC is distributed in the hope that it will be useful,
00018 //& but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //& GNU General Public License for more details.
00021 //& 
00022 //& You should have received a copy of the GNU General Public License
00023 //& along with HP-GCC; see the file COPYING. 
00024 //&
00025 //& As a special exception, you may use this file as part of a free software
00026 //& library without restriction.  Specifically, if other files instantiate
00027 //& templates or use macros or inline functions from this file, or you compile
00028 //& this file and link it with other files to produce an executable, this
00029 //& file does not by itself cause the resulting executable to be covered by
00030 //& the GNU General Public License.  This exception does not however
00031 //& invalidate any other reasons why the executable file might be covered by
00032 //& the GNU General Public License.
00033 //&
00034 //& ****************************************************************************
00035 
00036 // $Header: /cvsroot/hpgcc/sources/hplib/hptime.h,v 1.3 2005/06/23 12:29:05 iblank Exp $
00037 
00042 #ifndef _HPTIME_H
00043 #define _HPTIME_H
00044 
00045 
00046 #define CLOCKS_PER_SEC    60    
00047 
00048 #ifdef _POSIX_SOURCE
00049 #define CLK_TCK CLOCKS_PER_SEC    
00050 #endif
00051 
00052 #ifndef NULL
00053 #define NULL    ((void *)0)
00054 #endif
00055 
00056 
00057 #ifndef _TIME_T
00058 #define _TIME_T
00059 typedef long time_t;        /* time in sec since 1 Jan 1970 0000 GMT */
00060 #endif
00061 
00062 #ifndef _CLOCK_T
00063 #define _CLOCK_T
00064 typedef long clock_t;        /* time in ticks since process started */
00065 #endif
00066 
00067 struct tm {
00068   int tm_sec;            /* seconds after the minute [0, 59] */
00069   int tm_min;            /* minutes after the hour [0, 59] */
00070   int tm_hour;            /* hours since midnight [0, 23] */
00071   int tm_mday;            /* day of the month [1, 31] */
00072   int tm_mon;            /* months since January [0, 11] */
00073   int tm_year;            /* years since 1900 */
00074   int tm_wday;            /* days since Sunday [0, 6] */
00075   int tm_yday;            /* days since January 1 [0, 365] */
00076   int tm_isdst;            /* Daylight Saving Time flag */
00077 };
00078 
00079 
00080 void sys_tm_RTC(struct tm *);
00081 
00082 char *_isotime(const struct tm *, int strict_iso);
00083 #define isotime(tm) _isotime((tm),0)
00084 char *asctime(const struct tm *); 
00085 
00086 
00087 //extern char *tzname[];
00088 
00089 
00090 
00091 #endif 

Generated on Fri Feb 16 16:43:16 2007 for HP-GCCLibrary by  doxygen 1.5.0