I'm having a problem with my MUD, it gets to a point, which i found, see below. When i put a watch on the variable that was passed to Sleep(), it came out to about 14.5 days. /* * If we were asleep for more than one pass, count missed pulses and sleep * until we're resynchronized with the next upcoming pulse. */ if (process_time.tv_sec == 0 && process_time.tv_usec < OPT_USEC) { missed_pulses = 0; } else { missed_pulses = process_time.tv_sec * PASSES_PER_SEC; missed_pulses += process_time.tv_usec / OPT_USEC; process_time.tv_sec = 0; process_time.tv_usec = process_time.tv_usec % OPT_USEC; } /* Calculate the time we should wake up */ last_time = timeadd(before_sleep, timediff(opt_time, process_time)); /* Now keep sleeping until that time has come */ gettimeofday(&now, (struct timezone *) 0); timeout = timediff(last_time, now); /* go to sleep */ do { #ifdef CIRCLE_WINDOWS /* This is defined */ Sleep(timeout.tv_sec * 1000 + timeout.tv_usec / 1000); /* Problem is right here, it sleeps for 2 weeks */ Now, i'm wondering what would happen if I took this line out? It would just speed up the MUD, right? Please reply soon, it's got me baffled, currently, as a temp fix, i put an if before it to check the value is normal Rob Baumstark: shirak@connect.ab.ca cst0656@nait.ab.ca Forsaken Realms: telnet://drewl.v-wave.com:4000 +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST