Documentation

NTPTimeProvider
in package
implements ITimeProvider

Takes the time from any NTP server

Interfaces, Classes, Traits and Enums

ITimeProvider

Table of Contents

$host  : string
$port  : int
$timeout  : int
__construct()  : mixed
getTime()  : int

Properties

Methods

__construct()

public __construct([string $host = 'time.google.com' ][, int $port = 123 ][, int $timeout = 1 ]) : mixed
Parameters
$host : string = 'time.google.com'
$port : int = 123
$timeout : int = 1
Return values
mixed

getTime()

public getTime() : int
Return values
int

the current timestamp according to this provider

Search results