- return TIME_CHECK(a).tv_sec == TIME_CHECK(b).tv_sec && a.tv_nsec == b.tv_nsec;
-}
-
-struct timespec time_sub(struct timespec recent, struct timespec old)
-{
- struct timespec diff;
-
- diff.tv_sec = TIME_CHECK(recent).tv_sec - TIME_CHECK(old).tv_sec;
- if (old.tv_nsec > recent.tv_nsec) {
- diff.tv_sec--;
- diff.tv_nsec = 1000000000 + recent.tv_nsec - old.tv_nsec;
- } else
- diff.tv_nsec = recent.tv_nsec - old.tv_nsec;
-
- return TIME_CHECK(diff);
-}
-
-struct timespec time_add(struct timespec a, struct timespec b)
-{
- struct timespec sum;
-
- sum.tv_sec = TIME_CHECK(a).tv_sec + TIME_CHECK(b).tv_sec;
- sum.tv_nsec = a.tv_nsec + b.tv_nsec;
- if (sum.tv_nsec >= 1000000000) {
- sum.tv_sec++;
- sum.tv_nsec -= 1000000000;
- }
- return TIME_CHECK(sum);
-}
-
-struct timespec time_divide(struct timespec t, unsigned long div)
-{
- struct timespec res;