public function LogEntry::getDuration in Ultimate Cron 8.2
Get duration.
1 call to LogEntry::getDuration()
- LogEntry::formatDuration in src/
Logger/ LogEntry.php - Format duration.
File
- src/
Logger/ LogEntry.php, line 140
Class
- LogEntry
- Class for Ultimate Cron log entries.
Namespace
Drupal\ultimate_cron\LoggerCode
public function getDuration() {
$duration = 0;
if ($this->start_time && $this->end_time) {
$duration = (int) ($this->end_time - $this->start_time);
}
elseif ($this->start_time) {
$duration = (int) (microtime(TRUE) - $this->start_time);
}
return $duration;
}