PHP code example of withinboredom / time
1. Go to this page and download the library: Download withinboredom/time 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/ */
withinboredom / time example snippets
function sleep(\Withinboredom\Time\Time $time): void {
\sleep($time->as(\Withinboredom\Time\TimeUnit::Seconds));
}
sleep(\Withinboredom\Time\Minutes(5));
\Withinboredom\Time\Minutes(60) === \Withinboredom\Time\Hours(1)