pspsdk-1.0+beta2
time.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * time.h
7  *
8  * Copyright (c) 2002-2004 PS2DEV
9  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
10  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
11  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
12  *
13  * $Id: time.h 1095 2005-09-27 21:02:16Z jim $
14  */
15 
16 #ifndef _TIME_H
17 #define _TIME_H
18 
19 #include <stddef.h>
20 
21 #ifndef __clock_t_defined
22 typedef unsigned long clock_t;
23 #define __clock_t_defined
24 #endif
25 
26 #ifndef __time_t_defined
27 typedef unsigned long time_t;
28 #define __time_t_defined
29 #endif
30 
31 struct tm
32 {
33  int tm_sec;
34  int tm_min;
35  int tm_hour;
36  int tm_mday;
37  int tm_mon;
38  int tm_year;
39  int tm_wday;
40  int tm_yday;
41  int tm_isdst;
42 };
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 clock_t clock();
49 time_t time(time_t *t);
50 
51 // to be implemented...
52 double difftime(time_t time1, time_t time0);
53 time_t mktime(struct tm *timeptr);
54 char *asctime(const struct tm *timeptr);
55 char *ctime(const time_t *timep);
56 struct tm *gmtime(const time_t *timep);
57 struct tm *localtime(const time_t *timep);
58 size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif // TIME_H