void take_a_nap(void) { short i; i = get_rand(2, 5); md_sleep(1); while (i--) { mv_mons(); } md_sleep(1); message(you_can_move_again, 0); }
void error_do_pause(void) { int pid = md_getpid(); int timeleft = 600; /* 10 minutes max */ int interval = 10; /* 10 second message check */ /*LINTED*/ error_message("\nHPROF pause for PID %d\n", (int)pid); while ( p && timeleft > 0 ) { md_sleep(interval); /* 'assign p=0' to stop pause loop */ timeleft -= interval; } if ( timeleft <= 0 ) { error_message("\n HPROF pause got tired of waiting and gave up.\n"); } }