home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.uni-stuttgart.de/pub/systems/acorn/
/
Acorn.tar
/
Acorn
/
acornet
/
dev
/
c
/
debug
/
mnemosyn.spk
/
!Mnemosyne
/
sys
/
H
/
Time
< prev
next >
Wrap
Text File
|
1991-04-24
|
1KB
|
50 lines
/* Sys.H.Time: Arm 5-byte time utilities (header file) */
#ifndef _sys_time_h
#define _sys_time_h
/* Get struct tm from the ANSI header */
#include <time.h>
/* ARM System time format */
#ifndef __TIME_h
#define __TIME_h
typedef struct
{
unsigned char t[5]; /* Low byte first - ie. t[0] is low */
}
TIME;
#endif
struct utimbuf {
time_t actime; /* Access time */
time_t modtime; /* Modification time */
};
/* Units of time which could be added/subtracted from a TIME */
#define Secs(n) ((n) * 100)
#define Mins(n) ((n) * 6000)
#define Hrs(n) ((n) * 360000)
/* A time of "zero" */
extern TIME TIMENull;
/* Time arithmetic */
extern TIME TIMEadd (TIME t, int n);
extern int TIMEsub (TIME t1, TIME t2);
extern int TIMEcmp (TIME t1, TIME t2);
/* Time formatting */
extern char *TIMEfmt (const char *fmt, char *buffer, int len, TIME t);
extern char *TIMEstd (TIME t);
/* Creating time variables */
extern TIME TIMEnow (TIME *tp);
extern TIME TIMEmktime (struct tm *time);
/* Creating a 'struct tm' from a TIME */
extern struct tm *TIMEstruct (TIME t);
#endif