repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed: mac configure compile bugzid: 157
[deb_libcec.git]
/
src
/
lib
/
platform
/
util
/
timeutils.h
diff --git
a/src/lib/platform/util/timeutils.h
b/src/lib/platform/util/timeutils.h
index 3b1ef700c8f4213ca1a1f2af3ee15e5e6f5d71e7..f4f28109288074b3436001e810c8ebc0ed7bff25 100644
(file)
--- a/
src/lib/platform/util/timeutils.h
+++ b/
src/lib/platform/util/timeutils.h
@@
-78,7
+78,7
@@
namespace PLATFORM
inline int64_t GetTimeMs()
{
#if defined(__APPLE__)
inline int64_t GetTimeMs()
{
#if defined(__APPLE__)
- return (int64_t) (CVGetCurrentHostTime()
* 1000 / CVGetHostClockFrequency(
));
+ return (int64_t) (CVGetCurrentHostTime()
/ (int64_t)(CVGetHostClockFrequency() * 0.001
));
#elif defined(__WINDOWS__)
time_t rawtime;
time(&rawtime);
#elif defined(__WINDOWS__)
time_t rawtime;
time(&rawtime);
@@
-92,9
+92,9
@@
namespace PLATFORM
}
return -1;
#else
}
return -1;
#else
- time
val
time;
-
gettimeofday(&time, NULL
);
- return (int64_t)
(time.tv_sec * 1000 + time.tv_usec / 1000)
;
+ time
spec
time;
+
clock_gettime(CLOCK_MONOTONIC, &time
);
+ return (int64_t)
time.tv_sec * 1000 + time.tv_nsec / 1000000
;
#endif
}
#endif
}