You are here

function _perfmon_seconds_to_time in Performance monitor 7

Same name and namespace in other branches
  1. 8 perfmon.module \_perfmon_seconds_to_time()

Convert seconds to time.

1 call to _perfmon_seconds_to_time()
perfmon_get_mysql_performance_variables in ./perfmon.inc
Describes mysql performance variables.

File

./perfmon.inc, line 373
Stand-alone perfmon test system.

Code

function _perfmon_seconds_to_time($seconds) {
  $dtF = new \DateTime('@0');
  $dtT = new \DateTime("@{$seconds}");
  return $dtF
    ->diff($dtT)
    ->format(t('%a days, %h hours, %i minutes and %s seconds'));
}