Master supports pluggable clock

Convenient for testing, especially in timeout scenario.