You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2011/12/20 10:02:37 UTC
svn commit: r1221152 -
/karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java
Author: jbonofre
Date: Tue Dec 20 09:02:37 2011
New Revision: 1221152
URL: http://svn.apache.org/viewvc?rev=1221152&view=rev
Log:
[KARAF-1112] shell:sleep is now in seconds
Modified:
karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java
Modified: karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java
URL: http://svn.apache.org/viewvc/karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java?rev=1221152&r1=1221151&r2=1221152&view=diff
==============================================================================
--- karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java (original)
+++ karaf/trunk/shell/commands/src/main/java/org/apache/karaf/shell/shell/SleepAction.java Tue Dec 20 09:02:37 2011
@@ -23,14 +23,14 @@ import org.apache.karaf.shell.console.Ab
@Command(scope = "shell", name = "sleep", description = "Sleeps for a bit then wakes up.")
public class SleepAction extends AbstractAction {
- @Argument(index = 0, name = "duration", description = "The amount of millis to sleep", required = true, multiValued = false)
+ @Argument(index = 0, name = "duration", description = "The amount of seconds to sleep", required = true, multiValued = false)
private long time = -1;
protected Object doExecute() throws Exception {
- log.info("Sleeping for {}", time);
+ log.info("Sleeping for {} second(s)", time);
try {
- Thread.sleep(time);
+ Thread.sleep(time * 1000);
}
catch (InterruptedException ignore) {
log.debug("Sleep was interrupted... :-(");