You are here

private function Profiler::getTimestamp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Profiler/Profiler.php \Symfony\Component\HttpKernel\Profiler\Profiler::getTimestamp()
1 call to Profiler::getTimestamp()
Profiler::find in vendor/symfony/http-kernel/Profiler/Profiler.php
Finds profiler tokens for the given criteria.

File

vendor/symfony/http-kernel/Profiler/Profiler.php, line 282

Class

Profiler
Profiler.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

private function getTimestamp($value) {
  if (null === $value || '' == $value) {
    return;
  }
  try {
    $value = new \DateTime(is_numeric($value) ? '@' . $value : $value);
  } catch (\Exception $e) {
    return;
  }
  return $value
    ->getTimestamp();
}