repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40e124e
)
platform: added an Init() method in CTimeout, so it can be reset
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 13 Feb 2012 02:02:55 +0000
(
03:02
+0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 13 Feb 2012 02:07:26 +0000
(
03:07
+0100)
src/lib/platform/util/timeutils.h
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/platform/util/timeutils.h
b/src/lib/platform/util/timeutils.h
index 367c80bbbc3c1db707046e2efec38f4d1a3f9b6d..985712a78b8cd4acd377555b02396aa2e7402551 100644
(file)
--- a/
src/lib/platform/util/timeutils.h
+++ b/
src/lib/platform/util/timeutils.h
@@
-107,8
+107,11
@@
namespace PLATFORM
class CTimeout
{
public:
- CTimeout(uint32_t iTime) :
- m_iTarget(GetTimeMs() + iTime) {}
+ CTimeout(void) : m_iTarget(0) {}
+ CTimeout(uint32_t iTimeout) { Init(iTimeout); }
+
+ bool IsSet(void) const { return m_iTarget > 0; }
+ void Init(uint32_t iTimeout) { m_iTarget = GetTimeMs() + iTimeout; }
uint64_t TimeLeft(void) const
{