summaryrefslogtreecommitdiffstats
path: root/avahi-common/timeval-test.c
blob: a0392eb663927149eb5efdbc48b2558d3198565c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "util.h"

int main(int argc, char *argv[]) {

    GTimeVal a = { 5, 5 }, b;

    b = a;

    g_message("%li.%li", a.tv_sec, a.tv_usec);
    avahi_timeval_add(&a, -50);

    g_message("%li.%li", a.tv_sec, a.tv_usec);

    g_message("%lli", avahi_timeval_diff(&a, &b));
}