git-svn-id: http://ltt.polymtl.ca/svn@222 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 8 Sep 2003 19:44:35 +0000 (19:44 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 8 Sep 2003 19:44:35 +0000 (19:44 +0000)
ltt/branches/poly/ltt/tracefile.c

index 4f10f0829e79c54bd52f4484e02bd493ee90f7b1..bf2af685da903f8bdc30670b18ff888e58d89d9b 100644 (file)
@@ -1162,11 +1162,11 @@ int getFieldtypeSize(LttTracefile * t, LttEventType * evT, int offsetRoot,
 
 int timecmp(LttTime * t1, LttTime * t2)
 {
-  LttTime T;
-  TimeSub(T, *t1, *t2);
-  if(T.tv_sec == 0 && T.tv_nsec == 0) return 0;
-  else if(T.tv_sec > 0 || (T.tv_sec==0 && T.tv_nsec > 0)) return 1;
-  else return -1;
+  if(t1->tv_sec < t2->tv_sec) return -1;
+  if(t1->tv_sec > t2->tv_sec) return 1;
+  if(t1->tv_nsec < t2->tv_nsec) return -1;
+  if(t1->tv_nsec > t2->tv_nsec) return 1;
+  return 0;
 }
 
 /*****************************************************************************
This page took 0.024878 seconds and 4 git commands to generate.