Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 242 → Rev 265

/shark/trunk/oslib/ll/i386/pit.h
181,8 → 181,8
(t)->gigas += (t)->units / 1432809, \
(t)->units %= 1432809)
#define NULLPITSPEC(t) (t)->units = 0, (t)->gigas = 0
#define PITSPEC2USEC(t) ((((t)->units * 1000) / 1197) \
+ (((t)->gigas * 1000) * 1197))
#define PITSPEC2USEC(t) ((((signed long long)((t)->units) * 1000000) / 1193182) \
+ (((signed long long)((t)->gigas) * 1000000) * 1193182))
#define CPPITSPEC(a, b) (b)->units = (a)->units, (b)->gigas = (a)->gigas
END_DEF
#endif /* __PIT_H__ */
/shark/trunk/oslib/ll/sys/ll/time.h
127,21 → 127,21
 
#if 0
#define PITSPEC2TIMESPEC(a,b) \
((b)->tv_nsec = (((DWORD)((a)->units) * 1000) / 1197) * 1000, \
(b)->tv_sec = ((a)->gigas * 1197) / 1000) /*, \
((b)->tv_nsec = (((signed long long)((a)->units) * 1000000) / 1193182) * 1000, \
(b)->tv_sec = ((signed long long)((a)->gigas) * 1193182) / 1000000) /*, \
(b)->tv_sec += (b)->tv_nsec / 1000000000, \
(b)->tv_nsec %= 1000000000) */
#else
/*#define PITSPEC2TIMESPEC(a,b) \
((b)->tv_nsec = (((DWORD)((a)->units) * 1000) / 1197) * 1000, \
(b)->tv_nsec += (((a)->gigas * 1197) % 1000) * 1000000, \
(b)->tv_sec = ((a)->gigas * 1197) / 1000 , \
((b)->tv_nsec = (((signed long long)((a)->units) * 1000000) / 1193182) * 1000, \
(b)->tv_nsec += (((signed long long)((a)->gigas) * 1193182) % 1000000) * 1000000, \
(b)->tv_sec = ((signed long long)((a)->gigas) * 1193182) / 1000000 , \
(b)->tv_sec += (b)->tv_nsec / 1000000000, \
(b)->tv_nsec %= 1000000000)*/
#define PITSPEC2TIMESPEC(a,b) \
((b)->tv_nsec = (((DWORD)((a)->units) * 1000) / 1197), \
(b)->tv_nsec += (((a)->gigas * 1197) % 1000) * 1000, \
(b)->tv_sec = ((a)->gigas * 1197) / 1000 , \
((b)->tv_nsec = (((signed long long)((a)->units) * 1000000) / 1193182), \
(b)->tv_nsec += (((signed long long)((a)->gigas) * 1193182) % 1000000) * 1000, \
(b)->tv_sec = ((signed long long)((a)->gigas) * 1193182) / 1000000 , \
(b)->tv_sec += (b)->tv_nsec / 1000000, \
(b)->tv_nsec %= 1000000, \
(b)->tv_nsec *= 1000)