repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated changelog and bumped version numbers for v1.5.2
[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 985712a78b8cd4acd377555b02396aa2e7402551..b886f88a1cd58511b5cf03d9088af3456f6d54ac 100644
(file)
--- a/
src/lib/platform/util/timeutils.h
+++ b/
src/lib/platform/util/timeutils.h
@@
-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
}
@@
-113,10
+113,10
@@
namespace PLATFORM
bool IsSet(void) const { return m_iTarget > 0; }
void Init(uint32_t iTimeout) { m_iTarget = GetTimeMs() + iTimeout; }
bool IsSet(void) const { return m_iTarget > 0; }
void Init(uint32_t iTimeout) { m_iTarget = GetTimeMs() + iTimeout; }
- uint
64
_t TimeLeft(void) const
+ uint
32
_t TimeLeft(void) const
{
uint64_t iNow = GetTimeMs();
{
uint64_t iNow = GetTimeMs();
- return (iNow > m_iTarget) ? 0 :
m_iTarget - iNow
;
+ return (iNow > m_iTarget) ? 0 :
(uint32_t)(m_iTarget - iNow)
;
}
private:
}
private: