/* pause.c - 

to run, type:

pause <length of pause in seconds>

*/

#include <sys.types.h>
#include <sys.times.h>

#define Hz	50.0


double cpu_time();

main(argc,argv)
char **argv;
int argc;
{
   double pause = 10.0; /* length of pause */
   double time0;

   if ( argc > 1 )     /* length of pause given */
   { 
      argv++;

      sscanf( *argv, "%f", &pause );
   }       
   
   time0 = cpu_time();

   while ( ( cpu_time() - time0 ) < pause );
}

double cpu_time() /* returns current CPU time */
{
   struct tms Time;

   times(&Time);
   return ((double)Time.tms_utime)/Hz;
}
