function progress_estimate_completion in Progress 8
Same name and namespace in other branches
- 6 progress.module \progress_estimate_completion()
- 7 progress.module \progress_estimate_completion()
Estimate completion time of a progress
File
- ./
progress.module, line 157 - Progress framework for keeping track of progresses
Code
function progress_estimate_completion($progress) {
if ($progress->progress) {
$progress->estimate = $progress->start + 1 / $progress->progress * ($progress->current - $progress->start);
}
else {
$progress->estimate = NULL;
}
return $progress->estimate;
}