* handle timestamps correctly
authorMichal Voců <michal@ruk.cuni.cz>
Tue, 9 May 2006 20:44:18 +0000 (20:44 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Tue, 9 May 2006 20:44:18 +0000 (20:44 +0000)
org.glite.lb.common/src/lb_perftest.c

index 55b39cd..6acf443 100644 (file)
@@ -44,8 +44,8 @@ glite_wll_perftest_consumeEvent(edg_wll_Event *event)
           (strcmp(event->userTag.name, PERFTEST_END_TAG_NAME) == 0) &&
           (strcmp(event->userTag.value, PERFTEST_END_TAG_VALUE) == 0)) {
                /* print the timestamp */
-               fprintf(stderr, "PERFTEST_END_TIMESTAMP: %ld\n",
-                       endtime.tv_sec + 1000000L*endtime.tv_usec);
+               fprintf(stderr, "PERFTEST_END_TIMESTAMP: %lu\n",
+                       1000000L*(unsigned long)endtime.tv_sec + (unsigned long)endtime.tv_usec); 
                ret = 1;
        }
 
@@ -71,8 +71,8 @@ glite_wll_perftest_consumeEventString(const char *event_string)
        /* check for the termination event */
        if(strstr(event_string, termination_string) != NULL) {
                /* print the timestamp */
-               fprintf(stderr, "PERFTEST_END_TIMESTAMP: %ld\n",
-                       endtime.tv_sec + 1000000L*endtime.tv_usec);
+               fprintf(stderr, "PERFTEST_END_TIMESTAMP: %lu\n",
+                       1000000L*(unsigned long)endtime.tv_sec + (unsigned long)endtime.tv_usec);
                ret = 1;
        }