00001 #include <wvstream.h> 00002 00003 int main() 00004 { 00005 int nothing_count = 0; 00006 wvcon->autoforward(*wvcon); 00007 00008 while (wvcon->isok()) 00009 { 00010 if (wvcon->select(1000)) 00011 { 00012 nothing_count = 0; 00013 wvcon->callback(); 00014 } 00015 else 00016 { 00017 nothing_count++; 00018 wvcon->print("[TICK]"); 00019 if (nothing_count == 10) 00020 { 00021 wvcon->print("[TIMEOUT]\n"); 00022 break; 00023 } 00024 } 00025 } 00026 }