[BACK]Return to ev_timers.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / isc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/isc/ev_timers.c between version 1.6 and 1.6.8.1

version 1.6, 2008/06/21 20:41:48 version 1.6.8.1, 2011/01/10 00:42:18
Line 108  evSubTime(struct timespec minuend, struc
Line 108  evSubTime(struct timespec minuend, struc
   
 int  int
 evCmpTime(struct timespec a, struct timespec b) {  evCmpTime(struct timespec a, struct timespec b) {
         long x = a.tv_sec - b.tv_sec;  #define SGN(x) ((x) < 0 ? (-1) : (x) > 0 ? (1) : (0));
           time_t s = a.tv_sec - b.tv_sec;
           long n;
   
         if (x == 0L)          if (s != 0)
                 x = a.tv_nsec - b.tv_nsec;                  return SGN(s);
         return (x < 0L ? (-1) : x > 0L ? (1) : (0));  
           n = a.tv_nsec - b.tv_nsec;
           return SGN(n);
 }  }
   
 struct timespec  struct timespec

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.8.1

CVSweb <webmaster@jp.NetBSD.org>