better calculation of uptime