From c87b2140ab19ea9d568e928b2609c71d3ba34562 Mon Sep 17 00:00:00 2001 From: yangxx Date: Mon, 8 Sep 2003 19:44:35 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@222 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/tracefile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index 4f10f082..bf2af685 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -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; } /***************************************************************************** -- 2.34.1