Changeset 9844 for trunk/oscam-time.c
- Timestamp:
- 09/06/14 00:03:59 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-time.c
r9832 r9844 3 3 4 4 static enum clock_type clock_type = CLOCK_TYPE_UNKNOWN; 5 #if defined(CLOCKFIX) 5 6 struct timeval lasttime; // holds previous time to detect systemtime adjustments due to eg transponder change on dvb receivers 6 7 #endif 7 8 int64_t comp_timeb(struct timeb *tpa, struct timeb *tpb) 8 9 { … … 106 107 struct timeval tv; 107 108 gettimeofday(&tv, NULL); 109 #if defined(CLOCKFIX) 108 110 if (tv.tv_sec > lasttime.tv_sec || (tv.tv_sec == lasttime.tv_sec && tv.tv_usec >= lasttime.tv_usec)){ // check for time issues! 109 111 lasttime = tv; // register this valid time … … 115 117 //fprintf(stderr, "*** WARNING: BAD TIME AFFECTING WHOLE OSCAM ECM HANDLING, SYSTEMTIME SET TO LAST KNOWN VALID TIME **** \n"); 116 118 } 117 119 #endif 118 120 tp->time = tv.tv_sec; 119 121 tp->millitm = tv.tv_usec / 1000; … … 307 309 struct timeval tv; 308 310 gettimeofday(&tv, NULL); 311 #if defined(CLOCKFIX) 309 312 if (tv.tv_sec > lasttime.tv_sec || (tv.tv_sec == lasttime.tv_sec && tv.tv_usec >= lasttime.tv_usec)){ // check for time issues! 310 313 lasttime = tv; // register this valid time … … 316 319 //fprintf(stderr, "*** WARNING: BAD TIME AFFECTING WHOLE OSCAM ECM HANDLING, SYSTEMTIME SET TO LAST KNOWN VALID TIME **** \n"); 317 320 } 321 #endif 318 322 ts->tv_sec = tv.tv_sec; 319 323 ts->tv_nsec = tv.tv_usec * 1000;
Note:
See TracChangeset
for help on using the changeset viewer.