Ejemplo n.º 1
0
int
main(int argc, char *argv[])
{
   int length = 1024;

   argc--; argv++;      /* Skip argv[0] */

   /* See if argv[1] was a stream length */
   if (argc > 0 && isdigit(argv[0][0])) {
      if ((length = strtol(argv[0], NULL, 0)) <= 0) {
         std::cerr << "Must specify a positive length!\n";
         exit(1);
      }
      argc--; argv++;
   }

   SetupMillisTimer();

   /* Now process any requested tests */
   if (argc > 0) {
      do {
         RunTest(*argv, length);
         argc--; argv++;
      } while (argc > 0);
   } else {
      RunTest("rw", length);
      RunTest("runk1d", length);
      RunTest("runk2d", length);
   }

   //char c;
   //std::cerr << "Press <ENTER> to exit\n";
   //std::cin >> c;

   CleanupMillisTimer();

   return 0;
}
Ejemplo n.º 2
0
unsigned int StartTimer () {
   SetupMillisTimer();
   return 0;
}