00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00040 #ifndef TIME_H
00041 #define TIME_H
00042
00043
00044
00045
00046
00047
00049 #define TICKS_PER_SEC 256
00050
00051 #define MS10 (TICKS_PER_SEC / 100)
00052 #define MS20 (TICKS_PER_SEC / 50)
00053 #define MS50 (TICKS_PER_SEC / 20)
00054 #define MS100 (TICKS_PER_SEC / 10)
00055 #define MS125 (TICKS_PER_SEC / 8)
00056 #define MS200 (TICKS_PER_SEC / 5)
00057 #define MS250 (TICKS_PER_SEC / 4)
00058 #define MS500 (TICKS_PER_SEC / 2)
00059 #define MS1000 TICKS_PER_SEC
00060
00061 #define SEC1 TICKS_PER_SEC
00062 #define SEC2 (TICKS_PER_SEC * 2)
00063 #define SEC5 (TICKS_PER_SEC * 5)
00064 #define SEC10 (TICKS_PER_SEC * 10)
00065 #define SEC20 (TICKS_PER_SEC * 20)
00066 #define SEC30 (TICKS_PER_SEC * 30)
00067 #define SEC40 (TICKS_PER_SEC * 40)
00068 #define SEC50 (TICKS_PER_SEC * 50)
00069 #define SEC60 (TICKS_PER_SEC * 60)
00070
00071 #define MIN1 (TICKS_PER_SEC * 60)
00072 #define MIN2 (MIN1 * 2)
00073 #define MIN5 (MIN1 * 5)
00074 #define MIN10 (MIN1 * 10)
00075
00076 #define INFINITE 0xffffffffL
00077
00078
00079
00080
00081
00082
00083
00084 inline uint32_t otosGetTicks(void);
00085 void otosSleep(uint32_t ticks);
00086 void otosDelay(uint32_t ticks);
00087 inline void otosSetTickHook(void (*pFunc)(void));
00088 uint32_t otosGetTickDiff(uint32_t earlier);
00089
00090 #endif
00091