You can do this but for a Time
module.
In production provide something like this:
module {
public func now() {
Time.now();
};
};
During testing provide something like this:
module {
public func now() {
// Return a hard coded time value
};
};