Refactored time and clock classes so that functions can be called remotely (via function reference)