Commit b6a23e4f authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #276 in ZP/z-push from...

Merge pull request #276 in ZP/z-push from bugfix/ZP-959-decimals-in-memory-usage-and-time to release/2.2

* commit '38ce2a9b':
  ZP-959 Format time output at the end of the request to match memory usage format.
parents ff2f6ad4 38ce2a9b
...@@ -176,10 +176,10 @@ class ZLog { ...@@ -176,10 +176,10 @@ class ZLog {
static public function WriteEnd() { static public function WriteEnd() {
if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::$userLog)) { if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::$userLog)) {
if (version_compare(phpversion(), '5.4.0') < 0) { if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 2, ',', '.'); $time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 2);
} }
else { else {
$time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 2, ',', '.'); $time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 2);
} }
$peakUsage = memory_get_peak_usage(false); $peakUsage = memory_get_peak_usage(false);
$truePeakUsage = memory_get_peak_usage(true); $truePeakUsage = memory_get_peak_usage(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment