repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: add SetOSDString() to the interface (not supported by all tvs)
[deb_libcec.git]
/
src
/
lib
/
platform
/
timeutils.h
diff --git
a/src/lib/platform/timeutils.h
b/src/lib/platform/timeutils.h
index 20b6eff8d5e9b6b5669b89f432072bb8ec9ae200..1dd454fd51a8d7167375b5df69ccbd515db0a7bd 100644
(file)
--- a/
src/lib/platform/timeutils.h
+++ b/
src/lib/platform/timeutils.h
@@
-19,13
+19,22
@@
*/
#include <stdint.h>
*/
#include <stdint.h>
+#if defined(__APPLE__)
+#include <mach/mach_time.h>
+#include <CoreVideo/CVHostTime.h>
+#elif defined(__WINDOWS__)
+#include <time.h>
+#else
#include <sys/time.h>
#include <sys/time.h>
+#endif
namespace CEC
{
inline int64_t GetTimeMs()
{
namespace CEC
{
inline int64_t GetTimeMs()
{
- #ifdef __WINDOWS__
+ #if defined(__APPLE__)
+ return (int64_t) (CVGetCurrentHostTime() * 1000 / CVGetHostClockFrequency());
+ #elif defined(__WINDOWS__)
time_t rawtime;
time(&rawtime);
time_t rawtime;
time(&rawtime);