X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=includes%2Ftime.h;h=db2eb7c7237a9b91bb55135f73177c36570445c1;hp=aeda70f71005f2a4c4ef238a167d31fbe1324a05;hb=ac3f809c3c10347c110fac3db93af0954eda98bb;hpb=8b8277d2940a8745f85d86a9af3ad6970b5fa52c diff --git a/includes/time.h b/includes/time.h index aeda70f..db2eb7c 100644 --- a/includes/time.h +++ b/includes/time.h @@ -4,12 +4,38 @@ // Public Domain C Library - http://pdclib.sourceforge.net // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -// Provides a time datatype and time handling functions. +// Date and time // ---------------------------------------------------------------------------- #ifndef __TIME_H #define __TIME_H __TIME_H -// TODO +// ---------------------------------------------------------------------------- +// MACROS + +#define CLOCKS_PER_SEC // TODO +#define NULL 0 + +// ---------------------------------------------------------------------------- +// TYPES + +typedef clock_t; +typedef size_t; +typedef time_t; +struct tm; + +// ---------------------------------------------------------------------------- +// FUNCTIONS + +char * asctime( const struct tm * tptr ); +clock_t clock( void ); +char * ctime( const time_t * tod ); +double difftime( time_t t1, time_t t0 ); +struct tm * gmtime( const time_t * tod ); +struct tm * localtime( const time_t * tod ); +time_t mktime( struct tm * tptr ); +size_t strftime( char * restrict s, size_t n, const char * restrict format, + const struct tm * restrict tptr ); +time_t time( time_t * tod ); #endif // __TIME_H