|
SASC-NG
DVBSoftCAM
|
Inheritance diagram for cTransponderTime:Public Member Functions | |
| cTransponderTime (int Source, int Transponder) | |
| bool | Is (int Source, int Transponder) const |
| void | Set (time_t st) |
| time_t | Now (void) |
| void | SetHasHandler (bool on) |
| bool | HasHandler (void) const |
| cTransponderTime::cTransponderTime | ( | int | Source, |
| int | Transponder | ||
| ) |
| bool cTransponderTime::HasHandler | ( | void | ) | const [inline] |
| bool cTransponderTime::Is | ( | int | Source, |
| int | Transponder | ||
| ) | const |
Definition at line 79 of file tps.c.
Referenced by cSatTime::cSatTime().
{
return source==Source && transponder==Transponder;
}
| time_t cTransponderTime::Now | ( | void | ) |
Definition at line 101 of file tps.c.
References cTimeMs::Elapsed(), L_SYS_TIME, PRINTF, and cCondVar::TimedWait().
Referenced by cSatTime::Now(), and Set().
{
cMutexLock lock(&mutex);
if(sattime<0) {
if(!wait.TimedWait(mutex,3*1000)) {
PRINTF(L_SYS_TIME,"%x:%x: unsuccessfull wait",source,transponder);
return -1;
}
}
return sattime+(reftime.Elapsed()/1000);
}
| void cTransponderTime::Set | ( | time_t | st | ) |
Definition at line 84 of file tps.c.
References cCondVar::Broadcast(), cTimeMs::Elapsed(), L_SYS_TIME, Now(), PRINTF, cTimeMs::Set(), and stripspace().
Referenced by cSatTimeHook::Process().
{
cMutexLock lock(&mutex);
if(sattime<0 || reftime.Elapsed()>5*1000) {
reftime.Set(-100);
sattime=st;
wait.Broadcast();
char str[32];
struct tm utm;
st=Now();
time_t now=time(0);
gmtime_r(&st,&utm); asctime_r(&utm,str); stripspace(str);
PRINTF(L_SYS_TIME,"%x:%x: %s (delta %ld)",source,transponder,str,st-now);
}
}
| void cTransponderTime::SetHasHandler | ( | bool | on | ) | [inline] |
Definition at line 64 of file tps.c.
Referenced by cSatTimeHook::cSatTimeHook(), and cSatTimeHook::~cSatTimeHook().
{ hasHandler=on; }