6 gchar *flx_get_host_name(void) {
8 gethostname(t, sizeof(t));
9 return g_strndup(t, sizeof(t));
12 gchar *flx_normalize_name(const gchar *s) {
24 return g_strdup_printf("%s.", s);
27 gint flx_timeval_compare(const GTimeVal *a, const GTimeVal *b) {
31 if (a->tv_sec < b->tv_sec)
34 if (a->tv_sec > b->tv_sec)
37 if (a->tv_usec < b->tv_usec)
40 if (a->tv_usec > b->tv_usec)
46 glong flx_timeval_diff(const GTimeVal *a, const GTimeVal *b) {
49 g_assert(flx_timeval_compare(a, b) >= 0);
51 return (a->tv_sec - b->tv_sec)*1000000 + a->tv_usec - b->tv_usec;