default server is now ssh ios telnet
This commit is contained in:
parent
03545bf566
commit
80433b5bf2
2 changed files with 29 additions and 0 deletions
BIN
hostkey.ser
Normal file
BIN
hostkey.ser
Normal file
Binary file not shown.
29
src/main/java/perfix/MethodInvocation.java
Normal file
29
src/main/java/perfix/MethodInvocation.java
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
package perfix;
|
||||||
|
|
||||||
|
public class MethodInvocation {
|
||||||
|
private final long t0;
|
||||||
|
private final String name;
|
||||||
|
private long t1;
|
||||||
|
|
||||||
|
private MethodInvocation(String name) {
|
||||||
|
t0 = System.nanoTime();
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MethodInvocation start(String name) {
|
||||||
|
return new MethodInvocation(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stop() {
|
||||||
|
t1 = System.nanoTime();
|
||||||
|
Registry.add(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
long getDuration() {
|
||||||
|
return t1 - t0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue