|
QP/C
|
00001 /***************************************************************************** 00002 * Product: ANSI C library facilities for PC-Lint 00003 * Last Updated for Version: 4.4.00 00004 * Date of the Last Update: Jan 13, 2012 00005 * 00006 * Q u a n t u m L e a P s 00007 * --------------------------- 00008 * innovating embedded systems 00009 * 00010 * Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved. 00011 * 00012 * This software is be distributed and modified under the terms of the GNU 00013 * General Public License (GPL) as published by the Free Software Foundation 00014 * and appearing in the file GPL.TXT included in the packaging of this file. 00015 * Please note that GPL requires that all works based on this software must 00016 * also be made publicly available under the terms of the GPL ("Copyleft"). 00017 * 00018 * Alternatively, this software may be distributed and modified under the 00019 * terms of Quantum Leaps commercial licenses, which expressly supersede 00020 * the GPL and are specifically designed for licensees interested in 00021 * retaining the proprietary status of their code. 00022 * 00023 * Contact information: 00024 * Quantum Leaps Web site: http://www.quantum-leaps.com 00025 * e-mail: info@quantum-leaps.com 00026 *****************************************************************************/ 00027 #ifndef time_h 00028 #define time_h 00029 00030 #include <stddef.h> 00031 00032 struct tm { 00033 int tm_sec; /* seconds [0,61] */ 00034 int tm_min; /* minutes [0,59] */ 00035 int tm_hour; /* hour [0,23] */ 00036 int tm_mday; /* day of month [1,31] */ 00037 int tm_mon; /* month of year [0,11] */ 00038 int tm_year; /* years since 1900 */ 00039 int tm_wday; /* day of week [0,6] (Sunday = 0) */ 00040 int tm_yday; /* day of year [0,365] */ 00041 int tm_isdst; /* daylight savings flag */ 00042 }; 00043 00044 typedef long time_t; 00045 00046 struc timespec { 00047 time_t tv_sec; /* seconds */ 00048 long tv_nsec; /* nanoseconds */ 00049 }; 00050 00051 struct itimerspec { 00052 struct timespec it_interval; /* timer period */ 00053 struct timespec it_value; /* timer expiration */ 00054 }; 00055 00056 char *asctime(const struct tm *); 00057 char *asctime_r(const struct tm *, char *); 00058 //clock_t clock(void); 00059 //int clock_getres(clockid_t, struct timespec *); 00060 //int clock_gettime(clockid_t, struct timespec *); 00061 //int clock_settime(clockid_t, const struct timespec *); 00062 char *ctime(const time_t *); 00063 char *ctime_r(const time_t *, char *); 00064 double difftime(time_t, time_t); 00065 struct tm *getdate(const char *); 00066 struct tm *gmtime(const time_t *); 00067 struct tm *gmtime_r(const time_t *, struct tm *); 00068 struct tm *localtime(const time_t *); 00069 struct tm *localtime_r(const time_t *, struct tm *); 00070 time_t mktime(struct tm *); 00071 int nanosleep(const struct timespec *, struct timespec *); 00072 size_t strftime(char *, size_t, const char *, const struct tm *); 00073 char *strptime(const char *, const char *, struct tm *); 00074 time_t time(time_t *); 00075 //int timer_create(clockid_t, struct sigevent *, timer_t *); 00076 //int timer_delete(timer_t); 00077 //int timer_gettime(timer_t, struct itimerspec *); 00078 //int timer_getoverrun(timer_t); 00079 //int timer_settime(timer_t, int, const struct itimerspec *, 00080 struct itimerspec *); 00081 //void tzset(void); 00082 00083 extern int daylight; 00084 extern long int timezone; 00085 extern char *tzname[]; 00086 00087 #endif /* time_h */ 00088
1.7.6.1