Page load timer?

$starttime is undefined in your footer, so you’re subtracting nothing from endtime. declare global $starttime first and it’ll work.

that said, it won’t be a very accurate indicator of rendering time, since most of the work WordPress does happens before you ever reach the template and start your timer. There’s already a built-in timer that starts when WP is first loaded, you can print the output with the timer_stop function.