/* IRCfs - IRC FileServ for *nix. * Copyright (C) 2002 Nick 'Zaf' Clifford * For licensing details, refer to the LICENSE file in the source * code directory. */ #ifndef __include_time_h__ #define __include_time_h__ #include #include /* add_time(a,b,c) * a = b + c * Returns a.tv_sec */ time_t add_time(struct timeval *a, struct timeval *b, struct timeval *c); /* sub_time(a,b,c) * a = b - c * Returns a.tv_sec * Does not return negative numbers. (Will round negative numbers to 0) */ time_t sub_time(struct timeval *a, struct timeval *b, struct timeval *c); /* time_comp(a,b) * If a < b, returns -1 * if a > b, returns 1 * if a == b, returns 0 */ int time_comp(struct timeval *a, struct timeval *b); #endif