Introduce ITimeProvider. Closes #164.