1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  * All rights reserved.
4  * This program and the accompanying materials
5  * are made available under the terms of the BSD License
6  * which accompanies this distribution, and is available at
7  * http://www.opensource.org/licenses/bsd-license.php
8  *
9  * Contributors:
10  *     IBM Corporation - initial implementation
11  *****************************************************************************/
12 #ifndef _TIME_H
13 #define _TIME_H
14 
15 struct tm {
16 	int tm_sec;
17 	int tm_min;
18 	int tm_hour;
19 	int tm_mday;
20 	int tm_mon;
21 	int tm_year;
22 };
23 
24 typedef long time_t;
25 
26 struct timespec {
27 	time_t tv_sec;        /* seconds */
28 	long   tv_nsec;       /* nanoseconds */
29 };
30 
31 struct tm *gmtime_r(const time_t *timep, struct tm *result);
32 time_t mktime(struct tm *tm);
33 
34 /* Not implemented by libc but by hosting environment, however
35  * this is where the prototype is expected
36  */
37 int nanosleep(const struct timespec *req, struct timespec *rem);
38 
39 #endif /* _TIME_H */
40