Index: snmpv3.c
===================================================================
retrieving revision 1.2
diff -b -B -r1.2 snmpv3.c
48c48
< 
---
> #include <sys/sysinfo.h>
89c89
< static struct timeval snmpv3starttime;
---
> static long snmpv3starttime;
102a103,118
> long get_uptime_in_sec(void)
> {
> 	long ret;
> 	struct sysinfo *info = (struct sysinfo*)malloc(sizeof(struct sysinfo));
> 
> 	if(sysinfo(info) < 0)
> 	{
> 		perror("Getting uptime");
> 		return -1;
> 	}
> 	ret = info->uptime;
> 	free(info);
> 	
> 	return ret;
> }
> 
993,995c1009
< 
<     gettimeofday(&snmpv3starttime, NULL);
< 
---
>     snmpv3starttime = get_uptime_in_sec();
1288c1302
<     struct timeval  now;
---
> 	long now = get_uptime_in_sec();
1290,1291c1304
<     gettimeofday(&now, NULL);
<     return calculate_time_diff(&now, &snmpv3starttime) / 100;
---
> 	return now - snmpv3starttime;
