Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
f3a72313
Commit
f3a72313
authored
Jan 24, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2173335
by sun: Remove deprecated timer_* functions.
parent
6f3e437f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
30 deletions
+9
-30
core/includes/batch.inc
core/includes/batch.inc
+3
-2
core/includes/bootstrap.inc
core/includes/bootstrap.inc
+0
-24
core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
+3
-2
core/scripts/run-tests.sh
core/scripts/run-tests.sh
+3
-2
No files found.
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'
])
{
timer_
start
(
'batch_processing'
);
Timer
::
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'
]
&&
timer_
read
(
'batch_processing'
)
>
1000
)
{
if
(
$batch
[
'progressive'
]
&&
Timer
::
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'
);
timer_
start
(
'views_ui.preview'
);
Timer
::
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
=
timer_
stop
(
'views_ui.preview'
);
$this
->
render_time
=
Timer
::
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
"
;
timer_
start
(
'run-tests'
)
;
Timer::
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
=
timer_
stop
(
'run-tests'
)
;
$end
=
Timer::
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