Skip to content

Commit

Permalink
0001569: System clock goes too fast
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Feb 12, 2014
1 parent c7383be commit fdfae52
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Expand Up @@ -50,6 +50,7 @@ Launcher.Option.no-nio=Do not use Non-blocking IO for the HTTP connector.
Launcher.Option.no-directbuffer=Do not use direct buffers for the NIO HTTP connector.
Launcher.Option.http-basic-auth-user=Setting this option and --http-basic-auth-password will force the server to require basic authentication for all operations.
Launcher.Option.http-basic-auth-password=Setting this option and --http-basic-auth-user will force the server to require basic authentication for all operations.
Launcher.Option.winxp=Enable workaround thread to prevent system clock acceleration on Windows XP

SymAdmin.Cmd.reload-node=Reload data at a node (or initial load)
SymAdmin.Cmd.reload-table=Reload data at a node for a table
Expand Down
Expand Up @@ -59,7 +59,9 @@ public class SymmetricLauncher extends AbstractCommandLauncher {

private static final String OPTION_JMX_DISABLE = "jmx-disable";

private static final String OPTION_JMX_PORT = "jmx-port";
private static final String OPTION_JMX_PORT = "jmx-port";

private static final String OPTION_WINXP = "winxp";

public SymmetricLauncher(String app, String argSyntax, String messageKeyPrefix) {
super(app, argSyntax, messageKeyPrefix);
Expand Down Expand Up @@ -104,6 +106,7 @@ protected void buildOptions(Options options) {
addOption(options, "hbap", OPTION_HTTP_BASIC_AUTH_PASSWORD, true);
addOption(options, "JD", OPTION_JMX_DISABLE, false);
addOption(options, "J", OPTION_JMX_PORT, true);
addOption(options, OPTION_WINXP, OPTION_WINXP, false);
}

protected boolean executeWithOptions(CommandLine line) throws Exception {
Expand Down Expand Up @@ -166,6 +169,25 @@ protected boolean executeWithOptions(CommandLine line) throws Exception {
}
}
}
}

if (line.hasOption(OPTION_WINXP)) {
new Thread() {
{
this.setDaemon(true);
this.start();
}

public void run() {
log.info("Starting workaround thread to prevent system clock acceleration on Windows XP");
while (true) {
try {
Thread.sleep(Integer.MAX_VALUE);
} catch (InterruptedException ex) {
}
}
}
};
}

if (line.hasOption(OPTION_START_CLIENT)) {
Expand Down

0 comments on commit fdfae52

Please sign in to comment.