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
f3a72313
Commit
f3a72313
authored
Jan 24, 2014
by
webchick
Browse files
Issue
#2173335
by sun: Remove deprecated timer_* functions.
parent
6f3e437f
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/includes/batch.inc
View file @
f3a72313
...
...
@@ -14,6 +14,7 @@
* @see batch_get()
*/
use
Drupal\Component\Utility\Timer
;
use
Drupal\Core\Batch\Percentage
;
use
Symfony\Component\HttpFoundation\JsonResponse
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -214,7 +215,7 @@ function _batch_process() {
// proceed with the same batch phase when a processing time of 1 second has
// been exceeded.
if
(
$batch
[
'progressive'
])
{
t
imer
_
start
(
'batch_processing'
);
T
imer
::
start
(
'batch_processing'
);
}
if
(
empty
(
$current_set
[
'start'
]))
{
...
...
@@ -277,7 +278,7 @@ function _batch_process() {
$queue
=
_batch_queue
(
$current_set
);
// If we are in progressive mode, break processing after 1 second.
if
(
$batch
[
'progressive'
]
&&
t
imer
_
read
(
'batch_processing'
)
>
1000
)
{
if
(
$batch
[
'progressive'
]
&&
T
imer
::
read
(
'batch_processing'
)
>
1000
)
{
// Record elapsed wall clock time.
$current_set
[
'elapsed'
]
=
round
((
microtime
(
TRUE
)
-
$current_set
[
'start'
])
*
1000
,
2
);
break
;
...
...
core/includes/bootstrap.inc
View file @
f3a72313
...
...
@@ -222,30 +222,6 @@
*/
define
(
'DRUPAL_ROOT'
,
dirname
(
dirname
(
__DIR__
)));
/**
* @deprecated as of Drupal 8.0.
* @see \Drupal\Component\Utility\Timer::start
*/
function
timer_start
(
$name
)
{
Timer
::
start
(
$name
);
}
/**
* @deprecated as of Drupal 8.0.
* @see \Drupal\Component\Utility\Timer::read
*/
function
timer_read
(
$name
)
{
return
Timer
::
read
(
$name
);
}
/**
* @deprecated as of Drupal 8.0.
* @see \Drupal\Component\Utility\Timer::stop
*/
function
timer_stop
(
$name
)
{
return
Timer
::
stop
(
$name
);
}
/**
* Returns the appropriate configuration directory.
*
...
...
core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
View file @
f3a72313
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views_ui
;
use
Drupal\Component\Utility\Timer
;
use
Drupal\views\Views
;
use
Drupal\Core\Entity\EntityStorageControllerInterface
;
use
Drupal\views\ViewExecutable
;
...
...
@@ -612,7 +613,7 @@ public function renderPreview($display_id, $args = array()) {
$show_additional_queries
=
$config
->
get
(
'ui.show.additional_queries'
);
t
imer
_
start
(
'views_ui.preview'
);
T
imer
::
start
(
'views_ui.preview'
);
if
(
$show_additional_queries
)
{
$this
->
startQueryCapture
();
...
...
@@ -626,7 +627,7 @@ public function renderPreview($display_id, $args = array()) {
$this
->
endQueryCapture
();
}
$this
->
render_time
=
t
imer
_
stop
(
'views_ui.preview'
);
$this
->
render_time
=
T
imer
::
stop
(
'views_ui.preview'
);
views_ui_contextual_links_suppress_pop
();
...
...
core/scripts/run-tests.sh
View file @
f3a72313
...
...
@@ -6,6 +6,7 @@
require_once __DIR__
.
'/../vendor/autoload.php'
;
use Drupal
\C
omponent
\U
tility
\T
imer
;
use Drupal
\C
ore
\S
treamWrapper
\P
ublicStream
;
const SIMPLETEST_SCRIPT_COLOR_PASS
=
32
;
// Green.
...
...
@@ -724,7 +725,7 @@ function simpletest_script_reporter_init() {
echo
"Test run started:
\n
"
;
echo
" "
.
format_date
(
$_SERVER
[
'REQUEST_TIME'
]
,
'long'
)
.
"
\n
"
;
t
imer
_
start
(
'run-tests'
)
;
T
imer
::
start
(
'run-tests'
)
;
echo
"
\n
"
;
echo
"Test summary
\n
"
;
...
...
@@ -807,7 +808,7 @@ function simpletest_script_reporter_write_xml_results() {
*
/
function
simpletest_script_reporter_timer_stop
()
{
echo
"
\n
"
;
$end
=
t
imer
_
stop
(
'run-tests'
)
;
$end
=
T
imer
::
stop
(
'run-tests'
)
;
echo
"Test run duration: "
.
format_interval
(
$end
[
'time'
]
/ 1000
)
;
echo
"
\n\n
"
;
}
...
...
Write
Preview
Markdown
is supported
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