Add an interface for the timefactory class

@LukasReschke @PVince81 @nickvergessen @DeepDiver1975