PHP code example of tmihalicka / php-duration
1. Go to this page and download the library: Download tmihalicka/php-duration 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/ */
tmihalicka / php-duration example snippets
\Monadial\Duration\FiniteDuration::fromTimeUnit(1, TimeUnit::SECONDS); // create 1 second duration
\Monadial\Duration\FiniteDuration::fromNanos(1000); // create 1000 nanoseconds duration
\Monadial\Duration\FiniteDuration::fromTimeUnit('1 minutes'); // create 1 minute duration
bash
composer