Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/util/PhabricatorMetronome.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public function setFrequency($frequency) { | ||||
} | } | ||||
$this->frequency = $frequency; | $this->frequency = $frequency; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setOffsetFromSeed($seed) { | public function setOffsetFromSeed($seed) { | ||||
$offset = PhabricatorHash::digestToRange($seed, 0, PHP_INT_MAX); | $offset = PhabricatorHash::digestToRange($seed, 0, 0x7FFFFFFF); | ||||
return $this->setOffset($offset); | return $this->setOffset($offset); | ||||
} | } | ||||
public function getFrequency() { | public function getFrequency() { | ||||
if ($this->frequency === null) { | if ($this->frequency === null) { | ||||
throw new PhutilInvalidStateException('setFrequency'); | throw new PhutilInvalidStateException('setFrequency'); | ||||
} | } | ||||
return $this->frequency; | return $this->frequency; | ||||
Show All 32 Lines |