Drupal API

timer_start

  • Drupal 5
  • Drupal 6
Мы скоро все здесь переведем. Присоединяйся к нам, пока еще осталось что переводить ;)

includes/bootstrap.inc, строка 151

Версии
5 – 6
timer_start($name)

Start the timer with the specified name. If you start and stop the same timer multiple times, the measured intervals will be accumulated.

Параметры

name The name of the timer.

▸ 2 функции вызывают timer_start()

▾ 2 функции вызывают timer_start()

_batch_process in includes/batch.inc
Advance batch processing for 1 second (or process the whole batch if it was not set for progressive execution - e.g forms submitted by drupal_execute).
_drupal_bootstrap in includes/bootstrap.inc

Код

<?php
function timer_start($name) {
  global $timers;
  list($usec, $sec) = explode(' ', microtime());
  $timers[$name]['start'] = (float)$usec + (float)$sec;
  $timers[$name]['count'] = isset($timers[$name]['count']) ? ++$timers[$name]['count'] : 1;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему

Что такое OpenID?
  • Регистрация
  • Забыли пароль?

Документация

  • Drupal 6
  • Константы
  • Файлы
  • Функции
  • Глобальные переменные
  • Разделы