mirror of
https://github.com/ksherlock/marignotti.git
synced 2024-06-09 11:29:32 +00:00
add int math header
This commit is contained in:
parent
b71ea9536d
commit
19210120d2
|
@ -5,6 +5,8 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#include <intmath.h>
|
||||||
|
|
||||||
#pragma noroot
|
#pragma noroot
|
||||||
#pragma optimize 79
|
#pragma optimize 79
|
||||||
|
|
||||||
|
@ -22,7 +24,7 @@ static void ticks_to_timeval(LongWord ticks, struct timeval *tv)
|
||||||
qr = LongDivide(ticks, 60);
|
qr = LongDivide(ticks, 60);
|
||||||
|
|
||||||
tv->tv_sec = qr.quotient;
|
tv->tv_sec = qr.quotient;
|
||||||
tv->tv_usec = Multiply(qr.remainder, 16667);
|
tv->tv_usec = qr.remainder * 16667;
|
||||||
// qr.remainder * 1,000,000 / 60
|
// qr.remainder * 1,000,000 / 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user