You are here

function _connector_cron_time in Connector 6

1 call to _connector_cron_time()
connector_cron in ./connector.module
Implementation of hook_cron().

File

./connector.module, line 225
Connector module

Code

function _connector_cron_time() {
  static $time_limit;
  if (!$time_limit) {
    $max = ini_get('max_execution_time');
    if (!$max) {
      $max = 240;
    }
    $time_limit = time() + 0.15 * $max;

    // However, check for left time, maybe some other cron processing already occured
    $time_limit = min($time_limit, variable_get('cron_semaphore', time()) + $max);
  }
  return max($time_limit - time(), 0);
}