stub a time command

This commit is contained in:
Doug MacEachern 2005-02-24 17:37:29 +00:00
parent f702a007c7
commit eece975d12
2 changed files with 36 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public class Shell extends ShellBase {
registerCommandHandler("version", new Version(this));
registerCommandHandler("mps", new MultiPs(this));
registerCommandHandler("sysinfo", new SysInfo(this));
registerCommandHandler("time", new Time(this));
registerCommandHandler("who", new Who(this));
try {
//requires junit.jar

View File

@ -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);
}
}