forked from I2P_Developers/i2p.i2p
> Date: Fri, 13 Aug 2004 15:58:30 +1200 (NZST)
> Message-ID: <1776.202.37.75.101.1092369510.squirrel@202.37.75.101> > From: adam@adambuckley.net > To: jrandom@i2p.net > > [...] > > I hereby authorize my NtpClient.java and NtpMessage.java code to be > redistributed under the BSD license for the purpose of integration with > the I2P project, providing that I am credited as the original author of > the code. > > [...] w00t! adam++ code migrated into core/java/src/net/i2p/time, integrated with Clock, dropping that whole ugly pass-the-time-through-URL, and hence dropped support for :7655/setTime. New router.config properties to control the timestamper: time.sntpServerList=pool.ntp.org,pool.ntp.org,pool.ntp.org time.queryFrequencyMs=300000 time.disabled=false So, to disable, add time.disabled=true to your router.config. It is enabled by default. Default router.config and startup scripts updated accordingly (since timestamper.jar is now gone)
This commit is contained in:
@ -17,6 +17,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.time.Timestamper;
|
||||
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.router.ClientTunnelSettings;
|
||||
@ -221,9 +222,9 @@ public class ConfigNetHandler extends FormHandler {
|
||||
updateRates();
|
||||
|
||||
if (_timeSyncEnabled) {
|
||||
System.setProperty("timestamper.enabled", "true");
|
||||
_context.router().setConfigSetting(Timestamper.PROP_DISABLED, "false");
|
||||
} else {
|
||||
System.setProperty("timestamper.enabled", "false");
|
||||
_context.router().setConfigSetting(Timestamper.PROP_DISABLED, "false");
|
||||
}
|
||||
|
||||
boolean saved = _context.router().saveConfig();
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import java.util.Iterator;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.i2p.time.Timestamper;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
import net.i2p.router.RouterContext;
|
||||
@ -50,8 +51,8 @@ public class ConfigNetHelper {
|
||||
}
|
||||
|
||||
public String getEnableTimeSyncChecked() {
|
||||
String enabled = System.getProperty("timestamper.enabled");
|
||||
if ( (enabled == null) || (!"true".equals(enabled)) )
|
||||
String enabled = _context.getProperty(Timestamper.PROP_DISABLED, "true");
|
||||
if ( (enabled == null) || (!"true".equalsIgnoreCase(enabled)) )
|
||||
return "";
|
||||
else
|
||||
return " checked ";
|
||||
|
Reference in New Issue
Block a user