Fixed an overflow bug in time.c

The previous implementation stored all the time information in OSTime,
which is only 32 bit, and incremented every ms. This makes an overflow
happen about every 50 days.

Since the SNTP code handles time in seconds since January 1st, 1970,
using OSTime to directly store this second count is not an option, hence
this patch.

This new implementation stores the current value of OSTime every time we
set the clock. When we want to retrieve the current time, it will
calculate the offset from last time sync and add it to the date of the
last sync.