Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / wanuptime / wanuptime.c
blobace7feeeb138ba6881a84cdb91302c9f14c1e67c
1 #include <stdio.h>
2 #include <sys/sysinfo.h>
3 #include <time.h>
5 int main(int argc, char **argv)
7 struct sysinfo si;
8 time_t uptime;
10 sysinfo(&si);
11 if (check_wanup() && (f_read("/var/lib/misc/wantime", &uptime, sizeof(time_t)) == sizeof(uptime))) {
12 printf("%ld\n",si.uptime - uptime);
14 else
15 printf("0\n");
16 return 0;