forked from KNEMC/KLALB
KLALB UDP TEST
This commit is contained in:
@@ -3,15 +3,16 @@ package org.kne.debug;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class TimeDebugger {
|
||||
Map<String,Long> l=new Hashtable<String,Long>();
|
||||
Map<String,Long> l=new LinkedHashMap<String,Long>();
|
||||
long tmp=-1;
|
||||
public void putTime(String name){
|
||||
|
||||
long v=System.currentTimeMillis();
|
||||
long v=System.nanoTime();
|
||||
if(tmp==-1){
|
||||
l.put(name, 0l);
|
||||
}else{
|
||||
@@ -20,6 +21,6 @@ public class TimeDebugger {
|
||||
tmp=v;
|
||||
}
|
||||
public void print(){
|
||||
System.err.println(l+"(ms)");
|
||||
System.err.println(l+"(ns)");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user