Switched time from unsigned to unsigned long

Code will likely crash when time wraps around. An unsigned will wrap around in
a little over a day; an unsigned long will wrap around in 10^17 years.