1 #ifndef __OGCSYS_H__
2 #define __OGCSYS_H__
3 
4 #include <gccore.h>
5 #include <sys/types.h>
6 
7 #if defined(HW_RVL)
8 	#define TB_BUS_CLOCK				243000000u
9 	#define TB_CORE_CLOCK				729000000u
10 #elif defined(HW_DOL)
11 	#define TB_BUS_CLOCK				162000000u
12 	#define TB_CORE_CLOCK				486000000u
13 #endif
14 #define TB_TIMER_CLOCK					(TB_BUS_CLOCK/4000)			//4th of the bus frequency
15 
16 #define TB_MSPERSEC						1000
17 #define TB_USPERSEC						1000000
18 #define TB_NSPERSEC						1000000000
19 #define TB_NSPERMS						1000000
20 #define TB_NSPERUS						1000
21 #define TB_USPERTICK					10000
22 
23 #define TB_SECSPERMIN					60
24 #define TB_MINSPERHR					60
25 #define TB_MONSPERYR					12
26 #define TB_DAYSPERYR					365
27 #define TB_HRSPERDAY					24
28 #define TB_SECSPERDAY					(TB_SECSPERMIN*TB_MINSPERHR*TB_HRSPERDAY)
29 #define TB_SECSPERNYR					(365*TB_SECSPERDAY)
30 
31 #ifdef __cplusplus
32 	extern "C" {
33 #endif
34 
35 int nanosleep(struct timespec *tb);
36 
37 #ifdef __cplusplus
38 	}
39 #endif
40 
41 #endif
42