diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-10 19:12:43 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-10 19:12:43 +0200 |
commit | 34a1a4bad31ba6f138cd6a98249c774ff66285d1 (patch) | |
tree | 0e6f0b0af6edbb66490145b47fc5b60c9d58608c /system-dummy.c | |
parent | 3085170188cc5bf04f4cfb6f07c292e06d2b40a8 (diff) | |
download | netifd-34a1a4bad31ba6f138cd6a98249c774ff66285d1.tar.gz |
add interface uptime to the status info
Diffstat (limited to 'system-dummy.c')
-rw-r--r-- | system-dummy.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system-dummy.c b/system-dummy.c index 31bfac8..4c9a8fc 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -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; +} |