]> git.meshlink.io Git - catta/blob - avahi-common/timeval-test.c
* Change timeval arithmetic functions to use 64bit integers. This fixes some problems...
[catta] / avahi-common / timeval-test.c
1 #include "util.h"
2
3 int main(int argc, char *argv[]) {
4
5     GTimeVal a = { 5, 5 }, b;
6
7     b = a;
8
9     g_message("%li.%li", a.tv_sec, a.tv_usec);
10     avahi_timeval_add(&a, -50);
11
12     g_message("%li.%li", a.tv_sec, a.tv_usec);
13
14     g_message("%lli", avahi_timeval_diff(&a, &b));
15 }