home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / miscprog / pmusic11 / timechk.c < prev    next >
Text File  |  1989-06-14  |  937b  |  26 lines

  1. /*
  2. *
  3. *  TimeChk.c -- a program to return the amount of time elapsed
  4. *               during several processesor-intensive routines
  5. *               and to return the value of the appropriate polyphonic
  6. *               music-playing tempo. (see POLY.DOC for details)
  7. *
  8. ************************/
  9. #include <poly.h>
  10.  
  11. #define  DEFAULT  250
  12.  
  13. main(int argc, char *argv[])
  14. {
  15.    int t, n;
  16.    unsigned p;
  17.  
  18.    t = ( argc > 1? atoi(argv[1]) : 10 );      /* allows test input from command line */
  19.    n = ( argc > 2? atoi(argv[2]) : DEFAULT );
  20.    puts("Determining speed of processor... Please wait...");
  21.    printf("\nProcess speed for %d tests of %d nodes is: %d", t, n, p = processval(t,n));
  22.    printf("\nApproximate Polyphonic tempo speed for this computer = %u", polytempo(t,n));
  23.    /* note: polytempo was tailored to work only with the test values of
  24.            times = 10, nodes = 250 (later versions may be different) */
  25. }
  26.