mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
move clock_gettime() into GNU.cpp
This commit is contained in:
parent
22a90a0907
commit
ebe20a0825
2 changed files with 17 additions and 15 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include "GNU.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -6,4 +8,13 @@ void * _aligned_malloc(size_t size, size_t alignment) {
|
|||
posix_memalign(&buffer, alignment, size);
|
||||
return buffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
int clock_gettime(int foo, struct timespec *ts) {
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
ts->tv_sec = tv.tv_sec;
|
||||
ts->tv_nsec = tv.tv_usec * 1000;
|
||||
return(0);
|
||||
}
|
||||
#endif /* !__APPLE__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue