3 ms·
I agree. But another option is to make all the methods that would call now() take an extra parameter of the current time. Talk about making your dependencies
by blt 12y ago
I agree. But another option is to make all the methods that would call now() take an extra parameter of the current time. Talk about making your dependencies explicit...
- GrinningFool 12y agoBut now you've... a) changed your interface in a way that invites use cases you never intended (or wanted) to support. b) added branching code anywhere that requires now()