add interface uptime to the status info
[project/netifd.git] / system-dummy.c
index 31bfac8..4c9a8fc 100644 (file)
@@ -1,3 +1,4 @@
+#include <sys/time.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -165,3 +166,13 @@ int system_del_route(struct device *dev, struct device_route *route)
        D(SYSTEM, "route del %s%s%s\n", addr, gw, devstr);
        return 0;
 }
+
+time_t system_get_rtime(void)
+{
+       struct timeval tv;
+
+       if (gettimeofday(&tv, NULL) == 0)
+               return tv.tv_sec;
+
+       return 0;
+}