summaryrefslogtreecommitdiff
path: root/rcu.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcu.c')
-rw-r--r--rcu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/rcu.c b/rcu.c
index 71a3220e..4ea80d9e 100644
--- a/rcu.c
+++ b/rcu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: rcu.c 1.7 2004/12/19 17:19:34 kls Exp $
+ * $Id: rcu.c 1.8 2004/12/19 18:06:00 kls Exp $
*/
#include "rcu.h"
@@ -94,7 +94,7 @@ void cRcuRemote::Action(void)
#pragma pack()
time_t LastCodeRefresh = 0;
- int FirstTime = 0;
+ cTimeMs FirstTime;
uint64 LastCommand = 0;
bool repeat = false;
@@ -116,15 +116,14 @@ void cRcuRemote::Action(void)
// This remote control sends the above command before and after
// each keypress - let's just drop this:
break;
- int Now = time_ms();
Command |= uint64(Address) << 32;
if (Command != LastCommand) {
LastCommand = Command;
repeat = false;
- FirstTime = Now;
+ FirstTime.Set();
}
else {
- if (Now - FirstTime < REPEATDELAY)
+ if (FirstTime.Elapsed() < REPEATDELAY)
break; // repeat function kicks in after a short delay
repeat = true;
}