Changeset 1124 for pjproject/trunk
- Timestamp:
- Apr 2, 2007 11:28:41 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/os.h
r974 r1124 933 933 t->u32.lo = lo; 934 934 } 935 936 937 /** 938 * Compare timestamp t1 and t2. 939 * @param t1 t1. 940 * @param t2 t2. 941 * @return -1 if (t1 < t2), 1 if (t1 > t2), or 0 if (t1 == t2) 942 */ 943 PJ_INLINE(int) pj_cmp_timestamp(const pj_timestamp *t1, const pj_timestamp *t2) 944 { 945 #if PJ_HAS_INT64 946 if (t1->u64 < t2->u64) 947 return -1; 948 else if (t1->u64 > t2->u64) 949 return 1; 950 else 951 return 0; 952 #else 953 if (t1->u32.hi < t2->u32.hi || 954 (t1->u32.hi == t2->u32.hi && t1->u32.lo < t2->u32.lo)) 955 return -1; 956 else if (t1->u32.hi > t2->u32.hi || 957 (t1->u32.hi == t2->u32.hi && t1->u32.lo > t2->u32.lo)) 958 return 1; 959 else 960 return 0; 961 #endif 962 } 963 935 964 936 965 /**
Note: See TracChangeset
for help on using the changeset viewer.