convert timestamps to millseconds
add wraparound for main timer