Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
723056cb
Commit
723056cb
authored
Nov 12, 2006
by
drumm
Browse files
#93491
by chx. Don't attempt to read non-existent timers.
parent
7f25862f
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
723056cb
...
...
@@ -57,14 +57,16 @@ function timer_start($name) {
function
timer_read
(
$name
)
{
global
$timers
;
list
(
$usec
,
$sec
)
=
explode
(
' '
,
microtime
());
$stop
=
(
float
)
$usec
+
(
float
)
$sec
;
$diff
=
round
((
$stop
-
$timers
[
$name
][
'start'
])
*
1000
,
2
);
if
(
isset
(
$timers
[
$name
][
'start'
]))
{
list
(
$usec
,
$sec
)
=
explode
(
' '
,
microtime
());
$stop
=
(
float
)
$usec
+
(
float
)
$sec
;
$diff
=
round
((
$stop
-
$timers
[
$name
][
'start'
])
*
1000
,
2
);
if
(
isset
(
$timers
[
$name
][
'time'
]))
{
$diff
+=
$timers
[
$name
][
'time'
];
if
(
isset
(
$timers
[
$name
][
'time'
]))
{
$diff
+=
$timers
[
$name
][
'time'
];
}
return
$diff
;
}
return
$diff
;
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment