/* * 'time.h' created: Sat Oct 19 21:21:42 2002 * * Copyright 2002 by Lubomir Host <8host AT pauli.fmph.uniba.sk> * * License: GNU GPL (GNU Public License) * */ /* $Platon$ */ #ifndef TIME_H # define TIME_H /* in is defined macro for computing difference * between two timeval structures, but this macro is defined for * dynamic alocated structures. We define the same macro for * static structures. */ # define timersub_static(a, b, result) \ do { \ (result).tv_sec = (a).tv_sec - (b).tv_sec; \ (result).tv_usec = (a).tv_usec - (b).tv_usec; \ if ((result).tv_usec < 0) { \ --(result).tv_sec; \ (result).tv_usec += 1000000; \ } \ } while (0) #endif /* ifndef TIME_H */