PHP code example of asiby / chronos

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

    

asiby / chronos example snippets


use ASiby\Chronos;

use ASiby\Chronos;
// ...

Chronos::time();

use ASiby\Chronos;
// ...

Chronos::time("Time taken by the database call");

use ASiby\Chronos;
// ...

Chronos::time("API Request Time", true);

use ASiby\Chronos;
// ...

Chronos::time(null, true);

use ASiby\Chronos;

Chronos::time(null, true);
usleep(1500000);
Chronos::logTime(null, "First logTime()");
usleep(1500000);
Chronos::logTime(null, "Second logTime()", false);
usleep(500000);
Chronos::logTime(null, "Third logTime()");
usleep(1500000);
Chronos::logTime();
usleep(1500000);
Chronos::logTime();
usleep(500000);
Chronos::logTime();