PHP code example of bedd / timer

1. Go to this page and download the library: Download bedd/timer 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/ */

    

bedd / timer example snippets


$t = new Bedd\Timer\Timer();
$t->start();

// your process
sleep(3);

$t->end();
print_r($t->getSummary());

Array
(
    [status] => 3
    [start] => 1488831973.2328
    [end] => 1488831976.2334
    [total] => 3.0005979537964
    [paused] => 0
    [laps] => Array
        (
            [0] => Array
                (
                    [name] => start
                    [start] => 1488831973.2328
                    [end] => 1488831976.2334
                    [total] => 3.0006039142609
                )
        )
)