Lines Matching refs:one
24 timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two) in timelib_diff() argument
33 if (one->sse > two->sse) { in timelib_diff()
35 two = one; in timelib_diff()
36 one = swp; in timelib_diff()
42 if (one->zone_type == 3 && two->zone_type == 3 in timelib_diff()
43 && (strcmp(one->tz_info->name, two->tz_info->name) == 0) in timelib_diff()
44 && (one->z != two->z)) in timelib_diff()
46 dst_h_corr = (two->z - one->z) / 3600; in timelib_diff()
47 dst_m_corr = ((two->z - one->z) % 3600) / 60; in timelib_diff()
51 memcpy(&one_backup, one, sizeof(one_backup)); in timelib_diff()
54 timelib_apply_localtime(one, 0); in timelib_diff()
57 rt->y = two->y - one->y; in timelib_diff()
58 rt->m = two->m - one->m; in timelib_diff()
59 rt->d = two->d - one->d; in timelib_diff()
60 rt->h = two->h - one->h + dst_h_corr; in timelib_diff()
61 rt->i = two->i - one->i + dst_m_corr; in timelib_diff()
62 rt->s = two->s - one->s; in timelib_diff()
63 rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400)); in timelib_diff()
65 timelib_do_rel_normalize(rt->invert ? one : two, rt); in timelib_diff()
68 memcpy(one, &one_backup, sizeof(one_backup)); in timelib_diff()