Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16545

Improve totaltime calculation

    XMLWordPrintable

Details

    • Improvement
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • Other

    Description

      In phpbb, we are calculating the total processing time of a page, but there are currently two issues, or rather code that can be improved:

      • $starttime is currently set in startup.php, and used as global in other methods.
        This appears unneeded: where we need the starttime, we could as well use a variable set by PHP:

        request->server('REQUEST_TIME_FLOAT', 0.0)

      • For starttime, some code uses the string return version of microtime(), to then split the result and sum both parts. This should be replaced with microtime(true). Example from driver.php

      $mtime = explode(' ', microtime())
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Tomba Steven De Groote [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: