You are here

public function BackgroundProcess::calculateETA in Background Process 7.2

Calculate ETA of the process

File

./background_process.inc, line 824
External API short overview

Class

BackgroundProcess
@file

Code

public function calculateETA() {
  if ($this->progress > 0) {
    return $this->created + 1 / $this->progress * (microtime(TRUE) - $this->created);
  }
}