You are here

public function MostPopularLastRun::nextRun in Drupal Most Popular 7

Same name and namespace in other branches
  1. 6 classes/lastrun.php \MostPopularLastRun::nextRun()

Returns the timestamp of the next time the service can run.

If the service can run now (because no throttle was set or the throttle interval has expired), returns the current timestamp.

Return value

boolean The timestamp of the next time the service can run, which will always be greater than or equal to the current time.

File

classes/lastrun.php, line 75
Defines a wrapper for the mostpopular_last_run table.

Class

MostPopularLastRun
@file Defines a wrapper for the mostpopular_last_run table.

Code

public function nextRun() {
  if (empty($this->throttle)) {
    return time();
  }
  return max(strtotime($this->throttle, $this->last_run), time());
}