Lines Matching refs:two
28 timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two) in timelib_diff() argument
37 if (one->sse > two->sse) { in timelib_diff()
38 swp = two; in timelib_diff()
39 two = one; in timelib_diff()
46 if (one->zone_type == 3 && two->zone_type == 3 in timelib_diff()
47 && (strcmp(one->tz_info->name, two->tz_info->name) == 0) in timelib_diff()
48 && (one->z != two->z)) in timelib_diff()
50 dst_corr = two->z - one->z; in timelib_diff()
57 memcpy(&two_backup, two, sizeof(two_backup)); in timelib_diff()
60 timelib_apply_localtime(two, 0); in timelib_diff()
62 rt->y = two->y - one->y; in timelib_diff()
63 rt->m = two->m - one->m; in timelib_diff()
64 rt->d = two->d - one->d; in timelib_diff()
65 rt->h = two->h - one->h; in timelib_diff()
66 rt->i = two->i - one->i; in timelib_diff()
67 rt->s = two->s - one->s; in timelib_diff()
68 if (one_backup.dst == 0 && two_backup.dst == 1 && two->sse >= one->sse + 86400 - dst_corr) { in timelib_diff()
73 rt->days = fabs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400)); in timelib_diff()
75 timelib_do_rel_normalize(rt->invert ? one : two, rt); in timelib_diff()
78 if (one_backup.dst == 1 && two_backup.dst == 0 && two->sse >= one->sse + 86400) { in timelib_diff()
79 if (two->sse < one->sse + 86400 - dst_corr) { in timelib_diff()
90 memcpy(two, &two_backup, sizeof(two_backup)); in timelib_diff()