There is only one option within
Zend_TimeSync which will be used
internally: timeout. You can set any self-defined option you are in
need of and request it, however.
The option timeout defines the number of seconds after which
a connection is detected as broken when there was no response. The default value is
1, which means that
fallback to the next time server if the requested time server does not respond in one
setOptions() method, you can set any option. This
function accepts an array where the key is the option to set and the value is the value
of that option. Any previously set option will be overwritten by the new value. If you
want to know which options are set, use the
method. It accepts either a key which returns the given option if specified, or, if no
key is set, it will return all set options.
Zend_TimeSync::setOptions(array('timeout' => 3, 'myoption' => 'timesync'));
$server = new Zend_TimeSync(array('generic' => 'ntp:\\0.pool.ntp.org',
'fallback' => 'ntp:\\1.pool.ntp.org'));
print "Timeout = " . Zend_TimeSync::getOptions('timeout');
As you can see, the options for
Zend_TimeSync are static. Each
Zend_TimeSync will use the same options.