home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_07
/
LATTIC_3.ZIP
/
HEADERS
/
TIME.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-23
|
2KB
|
98 lines
/*
* time.h - defines for date and time
*
* Started 6/9/89 Alex G. Kiernan, based on Lattice source
*
* Copyright (c) 1989 HiSoft and Lattice, Inc.
*/
#ifndef _TIME_H
#define _TIME_H
#define NULL ((void *)0)
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned long size_t;
#endif
#ifndef _TIME_T
#define _TIME_T
typedef long time_t;
#endif
/*
*
* type used to hold clock ticks returned by clock()
*
*/
typedef long clock_t;
#define CLOCKS_PER_SEC 200 /* clock() granularity */
#define CLK_TCK CLOCKS_PER_SEC
/*
*
* This structure contains the unpacked time as returned by "gmtime".
*
*/
struct tm
{
int tm_sec, /* seconds after the minute */
tm_min, /* minutes after the hour */
tm_hour, /* hours since midnight */
tm_mday, /* day of the month */
tm_mon, /* months since January */
tm_year, /* years since 1900 */
tm_wday, /* days since Sunday */
tm_yday, /* days since January 1 */
tm_isdst; /* Daylight Savings Time flag */
};
/*
*
* ANSI time functions.
*
*/
clock_t clock(void);
double difftime(time_t, time_t);
time_t mktime(struct tm *);
time_t time(time_t *);
char *asctime(const struct tm *);
char *ctime(const time_t *);
struct tm *gmtime(const time_t *);
struct tm *localtime(const time_t *);
size_t strftime(char *, size_t, const char *, const struct tm *);
#if !defined __STDC__ || __STDC__!=1
/*
*
* Lattice time functions
*
*/
void getclk(unsigned char *);
int chgclk(unsigned char *);
void utunpk(long, char *);
long utpack(const char *);
int utime(const char *,const struct utimbuf *);
int stime(const time_t *);
#endif
void _tzset(void);
/*
* Lattice external variables
*/
extern int __daylight;
extern long __timezone;
extern char *__tzname[2];
extern char __tzstn[4];
extern char __tzdtn[4];
extern char *_TZ;
#endif