porting out clocksubtract to own repo