Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Timing.php

function Timing::getDuration

Get the duration of the run up to "now".

Return value

float Duration in milliseconds.

2 calls to Timing::getDuration()
Performance::generate in vendor/squizlabs/php_codesniffer/src/Reports/Performance.php
Prints the sniff performance report.
Timing::printRunTime in vendor/squizlabs/php_codesniffer/src/Util/Timing.php
Print information about the run.

File

vendor/squizlabs/php_codesniffer/src/Util/Timing.php, line 62

Class

Timing

Namespace

PHP_CodeSniffer\Util

Code

public static function getDuration() {
    if (self::$startTime === null) {
        // Timing was never started.
        return 0;
    }
    return (microtime(true) - self::$startTime) * 1000;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal