/* a > b : > 0 a = b : 0 a < b : < 0  */
int nstime_cmp(const nstime_t *a, const nstime_t *b)
/* a > b : > 0 a = b : 0 a < b : < 0  */
int nstime_cmp(const nstime_t *a, const nstime_t *b)
{
    if (G_UNLIKELY(nstime_is_unset(a))) {
        if (G_UNLIKELY(nstime_is_unset(b))) {
            return 0;
        } else {
            return -1;
        }
    } else {
        if (G_UNLIKELY(nstime_is_unset(b))) {
            return 1;
        }
    }
    if (a->secs == b->secs) {
        return a->nsecs - b->nsecs;
    } else {
        return (int) (a->secs - b->secs);
    }
}