]> pd.if.org Git - pdclib/blob - includes/time.h
Started introducting "personality".
[pdclib] / includes / time.h
1 // ----------------------------------------------------------------------------
2 // $Id$
3 // ----------------------------------------------------------------------------
4 // Public Domain C Library - http://pdclib.sourceforge.net
5 // This code is Public Domain. Use, modify, and redistribute at will.
6 // ----------------------------------------------------------------------------
7 // Date and time
8 // ----------------------------------------------------------------------------
9
10 #ifndef __TIME_H
11 #define __TIME_H __TIME_H
12
13 // TODO: Documentation.
14
15 // ----------------------------------------------------------------------------
16 // MACROS
17
18 #define CLOCKS_PER_SEC // TODO - personality?
19 #define NULL           0
20
21 // ----------------------------------------------------------------------------
22 // TYPES
23
24 typedef clock_t; // TODO - personality?
25 typedef size_t;  // TODO - personality?
26 typedef time_t;  // TODO - personality?
27 struct tm;       // TODO - personality?
28
29 // ----------------------------------------------------------------------------
30 // FUNCTIONS
31
32 char * asctime( const struct tm * tptr );
33 clock_t clock( void );
34 char * ctime( const time_t * tod );
35 double difftime( time_t t1, time_t t0 );
36 struct tm * gmtime( const time_t * tod );
37 struct tm * localtime( const time_t * tod );
38 time_t mktime( struct tm * tptr );
39 size_t strftime( char * restrict s, size_t n, const char * restrict format,
40                  const struct tm * restrict tptr );
41 time_t time( time_t * tod );
42
43 #endif // __TIME_H