File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 77 #include <synchapi.h>
88 #include <profileapi.h>
99 #include <sysinfoapi.h>
10+ #elif defined(__HAIKU__ )
11+ #include <OS.h>
1012#endif
1113
1214static inline double ffTimeGetTick (void ) //In msec
@@ -17,6 +19,8 @@ static inline double ffTimeGetTick(void) //In msec
1719 LARGE_INTEGER start ;
1820 QueryPerformanceCounter (& start );
1921 return (double ) start .QuadPart * 1000 / (double ) frequency .QuadPart ;
22+ #elif defined(__HAIKU__ )
23+ return (double ) system_time () / 1000. ;
2024 #else
2125 struct timespec timeNow ;
2226 clock_gettime (CLOCK_MONOTONIC , & timeNow );
@@ -30,6 +34,8 @@ static inline uint64_t ffTimeGetNow(void)
3034 uint64_t timeNow ;
3135 GetSystemTimeAsFileTime ((FILETIME * ) & timeNow );
3236 return (timeNow - 116444736000000000ull ) / 10000ull ;
37+ #elif defined(__HAIKU__ )
38+ return (uint64_t ) real_time_clock_usecs () / 1000u ;
3339 #else
3440 struct timespec timeNow ;
3541 clock_gettime (CLOCK_REALTIME , & timeNow );
Original file line number Diff line number Diff line change 11#include "uptime.h"
22#include "common/time.h"
33
4- #include <OS.h>
5-
64const char * ffDetectUptime (FFUptimeResult * result )
75{
8- result -> uptime = system_time () / 1000 ;
9- result -> bootTime = ( real_time_clock_usecs () / 1000 ) - result -> uptime ;
6+ result -> uptime = ( uint64_t ) system_time () / 1000 ;
7+ result -> bootTime = ffTimeGetNow ( ) - result -> uptime ;
108 return NULL ;
119}
You can’t perform that action at this time.
0 commit comments