stub a time command
This commit is contained in:
parent
f702a007c7
commit
eece975d12
|
@ -70,6 +70,7 @@ public class Shell extends ShellBase {
|
||||||
registerCommandHandler("version", new Version(this));
|
registerCommandHandler("version", new Version(this));
|
||||||
registerCommandHandler("mps", new MultiPs(this));
|
registerCommandHandler("mps", new MultiPs(this));
|
||||||
registerCommandHandler("sysinfo", new SysInfo(this));
|
registerCommandHandler("sysinfo", new SysInfo(this));
|
||||||
|
registerCommandHandler("time", new Time(this));
|
||||||
registerCommandHandler("who", new Who(this));
|
registerCommandHandler("who", new Who(this));
|
||||||
try {
|
try {
|
||||||
//requires junit.jar
|
//requires junit.jar
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package net.hyperic.sigar.cmd;
|
||||||
|
|
||||||
|
import net.hyperic.sigar.Sigar;
|
||||||
|
import net.hyperic.sigar.SigarException;
|
||||||
|
|
||||||
|
public class Time extends SigarCommandBase {
|
||||||
|
|
||||||
|
public Time(Shell shell) {
|
||||||
|
super(shell);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Time() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean validateArgs(String[] args) {
|
||||||
|
return args.length >= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSyntaxArgs() {
|
||||||
|
return "[command] [...]";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsageShort() {
|
||||||
|
return "Time command";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void output(String[] args) throws SigarException {
|
||||||
|
this.shell.handleCommand("time " + args[0], args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
new Time().processCommand(args);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue