summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.c b/util.c
index b8128c4..47642e8 100644
--- a/util.c
+++ b/util.c
@@ -113,3 +113,13 @@ GTimeVal *flx_elapse_time(GTimeVal *tv, guint msec, guint jitter) {
return tv;
}
+
+gint flx_age(const GTimeVal *a) {
+ GTimeVal now;
+
+ g_assert(a);
+
+ g_get_current_time(&now);
+
+ return flx_timeval_diff(&now, a);
+}