Lines Matching refs:one
29 timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two) in timelib_diff() argument
39 (one->sse > two->sse) || in timelib_diff()
40 (one->sse == two->sse && one->us > two->us) in timelib_diff()
43 two = one; in timelib_diff()
44 one = swp; in timelib_diff()
50 if (one->zone_type == 3 && two->zone_type == 3 in timelib_diff()
51 && (strcmp(one->tz_info->name, two->tz_info->name) == 0) in timelib_diff()
52 && (one->z != two->z)) in timelib_diff()
54 dst_corr = two->z - one->z; in timelib_diff()
60 memcpy(&one_backup, one, sizeof(one_backup)); in timelib_diff()
63 timelib_apply_localtime(one, 0); in timelib_diff()
66 rt->y = two->y - one->y; in timelib_diff()
67 rt->m = two->m - one->m; in timelib_diff()
68 rt->d = two->d - one->d; in timelib_diff()
69 rt->h = two->h - one->h; in timelib_diff()
70 rt->i = two->i - one->i; in timelib_diff()
71 rt->s = two->s - one->s; in timelib_diff()
72 rt->us = two->us - one->us; in timelib_diff()
73 if (one_backup.dst == 0 && two_backup.dst == 1 && two->sse >= one->sse + 86400 - dst_corr) { in timelib_diff()
78 rt->days = fabs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400)); in timelib_diff()
80 timelib_do_rel_normalize(rt->invert ? one : two, rt); in timelib_diff()
83 if (one_backup.dst == 1 && two_backup.dst == 0 && two->sse >= one->sse + 86400) { in timelib_diff()
84 if (two->sse < one->sse + 86400 - dst_corr) { in timelib_diff()
94 memcpy(one, &one_backup, sizeof(one_backup)); in timelib_diff()