Changeset 4458 for trunk/oscam-reader.c
- Timestamp:
- 01/14/11 16:12:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-reader.c
r4329 r4458 1 1 #include "globals.h" 2 #include <sys/time.h> 3 4 #define CHECK_HEALTH_PERIOD 1000 //check health only every X milliseconds 5 6 struct timeval last_time_health_checked = {0,0}; 2 7 3 int logfd=0; 8 4 … … 773 769 774 770 #ifdef WITH_CARDREADER 775 if (!(reader->typ & R_IS_CASCADING)) { 776 struct timeval cur_time; 777 gettimeofday(&cur_time,0); 778 if ((((cur_time.tv_sec-last_time_health_checked.tv_sec)*1000) + ((cur_time.tv_usec-last_time_health_checked.tv_usec)/1000L)) >= CHECK_HEALTH_PERIOD) { 779 reader_checkhealth(reader); 780 gettimeofday(&last_time_health_checked,0); 781 } 782 } 771 if (!(reader->typ & R_IS_CASCADING)) reader_checkhealth(reader); 783 772 #endif 784 773 return(0);
Note:
See TracChangeset
for help on using the changeset viewer.