2 ms·
For magic numbers, just use a well named variable, constant or configuration parameter. private const TIME_DELAY_SECONDS = 5; $this->executeAfter(TIME_DELAY_I
by segmondy 10y ago
For magic numbers, just use a well named variable, constant or configuration parameter.
private const TIME_DELAY_SECONDS = 5;
$this->executeAfter(TIME_DELAY_IN_SECONDS);
- gknoy 10y agoI'm a fan of named parameters, too: # python self.executeAfter(func=myCallback, delay_in_seconds=5) # or self.executeAfter(func=myCallback, after=delay(seconds=5))