@@ -429,9+430,9 @@ int main(int argc, char *argv[])
{
int ret = 0;
{
int ret = 0;
-#if 0
+#if 1
unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
- int numLoops = 5000;
+ int numLoops = 500; // number of default loops
long long resolution = 0;
struct timespec clockRes;
long long resolution = 0;
struct timespec clockRes;
@@ -447,6+448,20 @@ int main(int argc, char *argv[])
struct tm *locTime;
struct tm *locTime;
+ int opt;
+
+ while ((opt = getopt(argc, argv, "l:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'l':
+ numLoops = atoi(optarg);
+ break;
+ }
+ }
+
+ printf("Number of loops: %d\n", numLoops);
+
time_t t = time(0);
locTime = localtime(&t);
snprintf(sysTimeBuffer, BUFFER_SIZE, "The benchmark string to do write benchmarking: \"%s %.2d.%.2d.%d - %d:%.2d:%.2d Uhr\" [time and date]", dayOfWeek[locTime->tm_wday],
time_t t = time(0);
locTime = localtime(&t);
snprintf(sysTimeBuffer, BUFFER_SIZE, "The benchmark string to do write benchmarking: \"%s %.2d.%.2d.%d - %d:%.2d:%.2d Uhr\" [time and date]", dayOfWeek[locTime->tm_wday],