From b65d193a6c080233151240e386f8ea302f64c4ac Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 1 Apr 2003 13:05:25 +0000 Subject: [PATCH] Don't say milliseconds when you mean seconds git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274359 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/OptionalTasks/sshexec.html | 2 +- .../apache/tools/ant/taskdefs/optional/ssh/SSHExec.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/manual/OptionalTasks/sshexec.html b/docs/manual/OptionalTasks/sshexec.html index e587922c5..a55f91efe 100644 --- a/docs/manual/OptionalTasks/sshexec.html +++ b/docs/manual/OptionalTasks/sshexec.html @@ -99,7 +99,7 @@ for more information. This task has been tested with jsch-0.1.3.

timeout Stop the command if it doesn't finish within the - specified time (given in seconds). Defaults to 0 which means "wait forever". + specified time (given in milliseconds). Defaults to 0 which means "wait forever". No diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java index f99e4cd61..a3c77c780 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java @@ -80,7 +80,7 @@ import com.jcraft.jsch.Session; public class SSHExec extends SSHBase { private String command = null; // the command to execute via ssh - private int maxwait = 0; // units are milliseconds, default is 0=infinite + private long maxwait = 0; // units are milliseconds, default is 0=infinite private Thread thread = null; // for waiting for the command to finish private String output_property = null; // like @@ -110,14 +110,14 @@ public class SSHExec extends SSHBase { * * @param timeout The new timeout value in seconds */ - public void setTimeout(int timeout) { - maxwait = timeout * 1000; + public void setTimeout(long timeout) { + maxwait = timeout; } /** * If used, stores the output of the command to the given file. * - * @param maxwait The new maxwait value + * @param output The file to write to. */ public void setOutput(File output) { output_file = output;