PHP code example of kanti / server-timing

1. Go to this page and download the library: Download kanti/server-timing library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kanti / server-timing example snippets



  $stop = \Kanti\ServerTiming\Utility\TimingUtility::stopWatch('doSomething', 'additional Information');
  $result = $this->doSomethingExpensive();
  $stop();



  \Kanti\ServerTiming\Utility\TimingUtility::start('doSomething', 'additional Information');
  $result = $this->doSomethingExpensive();
  \Kanti\ServerTiming\Utility\TimingUtility::end('doSomething');