uptime calculation optimizations