Refactor Timer class's line printing functions

Took three near-identical functions, and instead created a single function
that takes a function pointer as a parameter.  This reduces code
length and complexity.