Used time units everywhere instead of seconds.

This is a move to reduce the number of situations
   where rounding error happens.
updated_to_time should now be a lossless function.
fixed rounding case
added assertion