This commit just moves time rendering logic to its own file, and does not make any functionality changes. (imported from commit d111d03c6abc8d9550fcf65e4f89eab8056d1ed4)