1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Removed delay_ms(), using cCondWait::SleepMs() instead

This commit is contained in:
Klaus Schmidinger 2004-12-19 17:22:13 +01:00
parent 1d3495a0f0
commit ce8369251c
6 changed files with 8 additions and 14 deletions

View File

@ -3221,3 +3221,4 @@ Video Disk Recorder Revision History
itoa() -> cItoa itoa() -> cItoa
WeekDayName() -> cWeekDayName WeekDayName() -> cWeekDayName
DayDateTime() -> cDayDateTime DayDateTime() -> cDayDateTime
- Removed delay_ms(), using cCondWait::SleepMs() instead.

View File

@ -36,3 +36,4 @@ VDR Plugin 'sky' Revision History
2004-12-19: Version 0.3.3 2004-12-19: Version 0.3.3
- Made several functions threadsafe. - Made several functions threadsafe.
- Removed delay_ms(), using cCondWait::SleepMs() instead.

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * See the README file for copyright information and how to reach the author.
* *
* $Id: sky.c 1.9 2004/12/19 15:33:47 kls Exp $ * $Id: sky.c 1.10 2004/12/19 17:21:52 kls Exp $
*/ */
#include <sys/socket.h> #include <sys/socket.h>
@ -113,7 +113,7 @@ void cDigiboxDevice::LircSend(const char *s)
dsyslog(buf);//XXX dsyslog(buf);//XXX
if (write(fd_lirc, buf, strlen(buf)) < 0) if (write(fd_lirc, buf, strlen(buf)) < 0)
LOG_ERROR;//XXX _STR LOG_ERROR;//XXX _STR
delay_ms(200); cCondWait::SleepMs(200);
} }
void cDigiboxDevice::LircSend(int n) void cDigiboxDevice::LircSend(int n)

4
rcu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: rcu.c 1.6 2003/10/18 11:34:30 kls Exp $ * $Id: rcu.c 1.7 2004/12/19 17:19:34 kls Exp $
*/ */
#include "rcu.h" #include "rcu.h"
@ -295,7 +295,7 @@ bool cRcuRemote::DetectCode(unsigned char *Code)
sprintf(buf, "C0D%c", *Code); sprintf(buf, "C0D%c", *Code);
String(buf); String(buf);
SetCode(*Code); SetCode(*Code);
delay_ms(2 * REPEATDELAY); cCondWait::SleepMs(2 * REPEATDELAY);
if (receivedCommand) { if (receivedCommand) {
SetMode(modeB); SetMode(modeB);
String("----"); String("----");

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: tools.c 1.83 2004/12/19 16:08:50 kls Exp $ * $Id: tools.c 1.84 2004/12/19 17:19:46 kls Exp $
*/ */
#include "tools.h" #include "tools.h"
@ -199,13 +199,6 @@ int time_ms(void)
return 0; return 0;
} }
void delay_ms(int ms)
{
int t0 = time_ms();
while (time_ms() - t0 < ms)
;
}
bool isnumber(const char *s) bool isnumber(const char *s)
{ {
if (!*s) if (!*s)

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: tools.h 1.59 2004/12/19 14:49:48 kls Exp $ * $Id: tools.h 1.60 2004/12/19 17:20:05 kls Exp $
*/ */
#ifndef __TOOLS_H #ifndef __TOOLS_H
@ -72,7 +72,6 @@ bool endswith(const char *s, const char *p);
bool isempty(const char *s); bool isempty(const char *s);
int numdigits(int n); int numdigits(int n);
int time_ms(void); int time_ms(void);
void delay_ms(int ms);
bool isnumber(const char *s); bool isnumber(const char *s);
int FreeDiskSpaceMB(const char *Directory, int *UsedMB = NULL); int FreeDiskSpaceMB(const char *Directory, int *UsedMB = NULL);
bool DirectoryOk(const char *DirName, bool LogErrors = false); bool DirectoryOk(const char *DirName, bool LogErrors = false);