home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OS9000
/
APPS
/
rcs.lzh
/
rcs1
/
time.h
< prev
next >
Wrap
Text File
|
1996-04-20
|
3KB
|
116 lines
/* Structure for use by time manipulating subroutines.
* The following library routines use it:
* libc: ctime, localtime, gmtime, asctime
* libcx: partime, maketime (may not be installed yet)
*/
#define TIMEID "$Id: time.h_v 1.2 96/04/07 00:32:17 hiro Exp $"
/* $Log: time.h_v $
* Revision 1.2 96/04/07 00:32:17 hiro
* Ported to OS-9000.
*
* Revision 1.1 93/04/02 01:39:09 hiro
* Initial revision
*
* Revision 1.1 90/07/19 15:23:06 momo
* Initial revision
*
* Revision 1.1 84/01/23 14:50:50 kcs
* Initial revision
*
* Revision 1.1 82/05/06 11:34:29 wft
* Initial revision
*
*/
#ifdef _OS9000
#include <time.h>
#define LCLZONE (5*60) /* Until V7 ftime(2) works, this defines local zone*/
#define TMNULL (-1) /* Items not specified are given this value
* in order to distinguish null specs from zero
* specs. This is only used by partime and
* maketime. */
/* Indices into TM structure */
#define TM_SEC 0 /* 0-59 */
#define TM_MIN 1 /* 0-59 */
#define TM_HOUR 2 /* 0-23 */
#define TM_MDAY 3 /* 1-31 day of month */
#define TM_DAY TM_MDAY /* " synonym */
#define TM_MON 4 /* 0-11 */
#define TM_YEAR 5 /* (year-1900) (year) */
#define TM_WDAY 6 /* 0-6 day of week (0 = Sunday) */
#define TM_YDAY 7 /* 0-365 day of year */
#define TM_ISDST 8 /* 0 Std, 1 DST */
/* New stuff */
# define TM_ZON 9 /* 0-(24*60) minutes west of Greenwich */
# define TM_AMPM 10 /* 1 AM, 2 PM */
#else
struct tm { /* See defines below for allowable ranges */
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
int tm_zon; /* NEW: mins westward of Greenwich */
int tm_ampm; /* NEW: 1 if AM, 2 if PM */
};
#define LCLZONE (5*60) /* Until V7 ftime(2) works, this defines local zone*/
#define TMNULL (-1) /* Items not specified are given this value
* in order to distinguish null specs from zero
* specs. This is only used by partime and
* maketime. */
/* Indices into TM structure */
#define TM_SEC 0 /* 0-59 */
#define TM_MIN 1 /* 0-59 */
#define TM_HOUR 2 /* 0-23 */
#define TM_MDAY 3 /* 1-31 day of month */
#define TM_DAY TM_MDAY /* " synonym */
#define TM_MON 4 /* 0-11 */
#define TM_YEAR 5 /* (year-1900) (year) */
#define TM_WDAY 6 /* 0-6 day of week (0 = Sunday) */
#define TM_YDAY 7 /* 0-365 day of year */
#define TM_ISDST 8 /* 0 Std, 1 DST */
/* New stuff */
# define TM_ZON 9 /* 0-(24*60) minutes west of Greenwich */
# define TM_AMPM 10 /* 1 AM, 2 PM */
#ifdef OSK
#ifndef ctime
#ifndef D_TckSec
#include <setsys.h>
#endif
typedef long clock_t;
typedef long time_t;
/* X3J11 Draft says *nowhere* that CLK_TCK is a constant! */
#define CLK_TCK ((clock_t) _getsys(D_TckSec, 2))
clock_t clock();
time_t time(), mktime();
double difftime();
char *asctime();
struct tm *gmtime();
struct tm *localtime();
extern togmtime();
#define ctime(t) asctime(localtime((t)))
#define difftime(t1, t0) ((double) ((t1) - (t0)))
#endif
#endif /* OSK */
#endif /* _OS9000 */