/[cvs]/ccvs/lib/timespec.h
ViewVC logotype

Diff of /ccvs/lib/timespec.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dprice, Mon May 23 17:44:33 2005 UTC revision 1.4 by dprice, Mon Sep 19 16:24:56 2005 UTC
# Line 42  struct timespec Line 42  struct timespec
42  };  };
43  # endif  # endif
44    
45  # ifdef ST_MTIM_NSEC  /* Return negative, zero, positive if A < B, A == B, A > B, respectively.
46  #  define ST_TIME_CMP_NS(a, b, ns) ((a).ns < (b).ns ? -1 : (a).ns > (b).ns)     Assume the nanosecond components are in range, or close to it.  */
47  # else  static inline int
48  #  define ST_TIME_CMP_NS(a, b, ns) 0  timespec_cmp (struct timespec a, struct timespec b)
49  # endif  {
50  # define ST_TIME_CMP(a, b, s, ns) \    return (a.tv_sec < b.tv_sec ? -1
51     ((a).s < (b).s ? -1 : (a).s > (b).s ? 1 : ST_TIME_CMP_NS(a, b, ns))            : a.tv_sec > b.tv_sec ? 1
52  # define ATIME_CMP(a, b) ST_TIME_CMP (a, b, st_atime, st_atim.ST_MTIM_NSEC)            : a.tv_nsec - b.tv_nsec);
53  # define CTIME_CMP(a, b) ST_TIME_CMP (a, b, st_ctime, st_ctim.ST_MTIM_NSEC)  }
 # define MTIME_CMP(a, b) ST_TIME_CMP (a, b, st_mtime, st_mtim.ST_MTIM_NSEC)  
   
 # ifdef ST_MTIM_NSEC  
 #  define TIMESPEC_NS(timespec) ((timespec).ST_MTIM_NSEC)  
 # else  
 #  define TIMESPEC_NS(timespec) 0  
 # endif  
54    
55  # if ! HAVE_DECL_NANOSLEEP  # if ! HAVE_DECL_NANOSLEEP
56  /* Don't specify a prototype here.  Some systems (e.g., OSF) declare  /* Don't specify a prototype here.  Some systems (e.g., OSF) declare

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26