Lines Matching refs:interval
211 timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval) in timelib_add() argument
216 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_add()
217 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_add()
219 if (interval->invert) { in timelib_add()
223 t->relative.y = interval->y * bias; in timelib_add()
224 t->relative.m = interval->m * bias; in timelib_add()
225 t->relative.d = interval->d * bias; in timelib_add()
226 t->relative.h = interval->h * bias; in timelib_add()
227 t->relative.i = interval->i * bias; in timelib_add()
228 t->relative.s = interval->s * bias; in timelib_add()
229 t->relative.us = interval->us * bias; in timelib_add()
242 timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval) in timelib_sub() argument
247 if (interval->invert) { in timelib_sub()
252 t->relative.y = 0 - (interval->y * bias); in timelib_sub()
253 t->relative.m = 0 - (interval->m * bias); in timelib_sub()
254 t->relative.d = 0 - (interval->d * bias); in timelib_sub()
255 t->relative.h = 0 - (interval->h * bias); in timelib_sub()
256 t->relative.i = 0 - (interval->i * bias); in timelib_sub()
257 t->relative.s = 0 - (interval->s * bias); in timelib_sub()
258 t->relative.us = 0 - (interval->us * bias); in timelib_sub()
284 timelib_time *timelib_add_wall(timelib_time *old_time, timelib_rel_time *interval) in timelib_add_wall() argument
292 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_add_wall()
293 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_add_wall()
299 if (interval->invert) { in timelib_add_wall()
303 t->relative.y = interval->y * bias; in timelib_add_wall()
304 t->relative.m = interval->m * bias; in timelib_add_wall()
305 t->relative.d = interval->d * bias; in timelib_add_wall()
311 if (interval->us == 0) { in timelib_add_wall()
312 t->sse += bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s); in timelib_add_wall()
315 timelib_rel_time *temp_interval = timelib_rel_time_clone(interval); in timelib_add_wall()
338 timelib_time *timelib_sub_wall(timelib_time *old_time, timelib_rel_time *interval) in timelib_sub_wall() argument
346 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_sub_wall()
347 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_sub_wall()
352 if (interval->invert) { in timelib_sub_wall()
356 t->relative.y = 0 - (interval->y * bias); in timelib_sub_wall()
357 t->relative.m = 0 - (interval->m * bias); in timelib_sub_wall()
358 t->relative.d = 0 - (interval->d * bias); in timelib_sub_wall()
364 if (interval->us == 0) { in timelib_sub_wall()
365 t->sse -= bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s); in timelib_sub_wall()
368 timelib_rel_time *temp_interval = timelib_rel_time_clone(interval); in timelib_sub_wall()