1 #if !defined( lint ) && !defined( SABER ) 2 /* #ident "@(#)erase.h 4.14 99/06/17 xlockmore" */ 3 4 #endif 5 6 /*- 7 * Erase stuff 8 * 9 * See xlock.c for copying information. 10 * 11 * Revision History: 12 * 17-06-99: Started log. :) 13 */ 14 15 #if HAVE_GETTIMEOFDAY 16 GETTIMEOFDAY(&tp); 17 if (tp.tv_sec - t0 >= erasetime ) { 18 break; 19 } 20 #endif 21 if (actual_delay > 0 && ((LOOPVAR % granularity) == 0)) 22 #if HAVE_GETTIMEOFDAY 23 { 24 interval = (int) (tp.tv_usec - t_prev + 25 1000000 * ( tp.tv_sec - t1_prev )); 26 interval = actual_delay * granularity - interval; 27 if (interval > 0) 28 (void) usleep(interval); 29 GETTIMEOFDAY(&tp); 30 t_prev = (int) (tp.tv_usec); 31 t1_prev = (int) (tp.tv_sec); 32 } 33 #else 34 (void) usleep( actual_delay * granularity ); 35 #endif 36