]> git.meshlink.io Git - catta/blobdiff - util.c
add known answer suppresion server part
[catta] / util.c
diff --git a/util.c b/util.c
index b8128c40c1e05de312200598d55c53e2247834ae..47642e815c8b21436a6850a244ceae824f3b2279 100644 (file)
--- 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);
+}