Lines Matching refs:interval
264 timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval) in timelib_add() argument
269 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_add()
270 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_add()
272 if (interval->invert) { in timelib_add()
276 t->relative.y = interval->y * bias; in timelib_add()
277 t->relative.m = interval->m * bias; in timelib_add()
278 t->relative.d = interval->d * bias; in timelib_add()
279 t->relative.h = interval->h * bias; in timelib_add()
280 t->relative.i = interval->i * bias; in timelib_add()
281 t->relative.s = interval->s * bias; in timelib_add()
282 t->relative.us = interval->us * bias; in timelib_add()
295 timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval) in timelib_sub() argument
300 if (interval->invert) { in timelib_sub()
305 t->relative.y = 0 - (interval->y * bias); in timelib_sub()
306 t->relative.m = 0 - (interval->m * bias); in timelib_sub()
307 t->relative.d = 0 - (interval->d * bias); in timelib_sub()
308 t->relative.h = 0 - (interval->h * bias); in timelib_sub()
309 t->relative.i = 0 - (interval->i * bias); in timelib_sub()
310 t->relative.s = 0 - (interval->s * bias); in timelib_sub()
311 t->relative.us = 0 - (interval->us * bias); in timelib_sub()
337 timelib_time *timelib_add_wall(timelib_time *old_time, timelib_rel_time *interval) in timelib_add_wall() argument
345 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_add_wall()
346 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_add_wall()
352 if (interval->invert) { in timelib_add_wall()
356 t->relative.y = interval->y * bias; in timelib_add_wall()
357 t->relative.m = interval->m * bias; in timelib_add_wall()
358 t->relative.d = interval->d * bias; in timelib_add_wall()
364 if (interval->us == 0) { in timelib_add_wall()
365 t->sse += bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s); in timelib_add_wall()
368 timelib_rel_time *temp_interval = timelib_rel_time_clone(interval); in timelib_add_wall()
391 timelib_time *timelib_sub_wall(timelib_time *old_time, timelib_rel_time *interval) in timelib_sub_wall() argument
399 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_sub_wall()
400 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_sub_wall()
405 if (interval->invert) { in timelib_sub_wall()
409 t->relative.y = 0 - (interval->y * bias); in timelib_sub_wall()
410 t->relative.m = 0 - (interval->m * bias); in timelib_sub_wall()
411 t->relative.d = 0 - (interval->d * bias); in timelib_sub_wall()
417 if (interval->us == 0) { in timelib_sub_wall()
418 t->sse -= bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s); in timelib_sub_wall()
421 timelib_rel_time *temp_interval = timelib_rel_time_clone(interval); in timelib_sub_wall()