Rx\Scheduler\ImmediateScheduler::now PHP Метод

now() публичный Метод

Returns milliseconds since the start of the epoch.
public now ( )
    public function now()
    {
        if (function_exists('microtime')) {
            return $milliseconds = floor(microtime(true) * 1000);
        }
        return time() * 1000;
    }

Usage Example

Пример #1
0
 /**
  * @test
  */
 public function now_returns_the_time()
 {
     $scheduler = new ImmediateScheduler();
     $this->assertTrue(abs(time() * 1000 - $scheduler->now()) < 1000, "time difference is less than or equal to 1");
 }