Lifespan.dynamic constructor
Creates dynamic validator that will change it's EntityValidator.isValid in time
ttl
Time to live
clock
Clock implementation
Implementation
factory Lifespan.dynamic(int ttl, [ Clock clock = Clock.system ]) {
final wasBorn = clock.getMillis();
return Lifespan._private(
wasBorn,
ttl,
_DynamicValidation(clock)
);
}