This repository was archived by the owner on Nov 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 11<?php
2+
23/**
34 * CodeIgniter
45 *
3536 * @since Version 1.0.0
3637 * @filesource
3738 */
38- defined ('BASEPATH ' ) OR exit ('No direct script access allowed ' );
39+ defined ('BASEPATH ' ) or exit ('No direct script access allowed ' );
3940
4041/**
4142 * Benchmark Class
4950 * @author EllisLab Dev Team
5051 * @link https://codeigniter.com/userguide3/libraries/benchmark.html
5152 */
52- class CI_Benchmark {
53+ class CI_Benchmark
54+ {
5355
5456 /**
5557 * List of all benchmark markers
@@ -69,7 +71,7 @@ class CI_Benchmark {
6971 */
7072 public function mark ($ name )
7173 {
72- $ this ->marker [$ name ] = microtime (TRUE );
74+ $ this ->marker [$ name ] = microtime (true );
7375 }
7476
7577 // --------------------------------------------------------------------
@@ -94,19 +96,16 @@ public function mark($name)
9496 */
9597 public function elapsed_time ($ point1 = '' , $ point2 = '' , $ decimals = 4 )
9698 {
97- if ($ point1 === '' )
98- {
99+ if ($ point1 === '' ) {
99100 return '{elapsed_time} ' ;
100101 }
101102
102- if ( ! isset ($ this ->marker [$ point1 ]))
103- {
103+ if ( ! isset ($ this ->marker [$ point1 ])) {
104104 return '' ;
105105 }
106106
107- if ( ! isset ($ this ->marker [$ point2 ]))
108- {
109- $ this ->marker [$ point2 ] = microtime (TRUE );
107+ if ( ! isset ($ this ->marker [$ point2 ])) {
108+ $ this ->marker [$ point2 ] = microtime (true );
110109 }
111110
112111 return number_format ($ this ->marker [$ point2 ] - $ this ->marker [$ point1 ], $ decimals );
@@ -129,5 +128,4 @@ public function memory_usage()
129128 {
130129 return '{memory_usage} ' ;
131130 }
132-
133131}
You can’t perform that action at this time.
0 commit comments