Fixes #204.  Use a more efficient algorithm for normalizing the timestam...

...ps based on a specific timeunit.