You are here

protected function MigrationBase::timeOptionExceeded in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 includes/base.inc \MigrationBase::timeOptionExceeded()

Test whether we've exceeded the designated time limit.

Return value

boolean TRUE if the threshold is exceeded, FALSE if not.

2 calls to MigrationBase::timeOptionExceeded()
Migration::import in includes/migration.inc
Perform an import operation - migrate items from source to destination.
Migration::rollback in includes/migration.inc
Perform a rollback operation - remove migrated items from the destination.

File

includes/base.inc, line 1272
Defines the base class for migration processes.

Class

MigrationBase
The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…

Code

protected function timeOptionExceeded() {
  if (!($timelimit = $this
    ->getTimeLimit())) {
    return FALSE;
  }
  $time_elapsed = time() - REQUEST_TIME;
  if ($time_elapsed >= $timelimit) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}