package LeetCode;

import java.util.Hashtable;

public class Main {
	public static void main(String[] args) {
	}
	
	private static Hashtable<String, Long> timerData = new Hashtable<String, Long>();
	
	static void startTimer(String key) throws Exception{
		if(timerData.containsKey(key)){
			throw new Exception("duplicate timer key:" + key);
		}
		timerData.put(key, System.nanoTime());
	}
	
	static long endTimer(String key) throws Exception{
		if(!timerData.containsKey(key)){
			throw new Exception("timer key not exist:" + key);
		}
		long timeSpan = System.nanoTime() - timerData.get(key);
		timerData.remove(key);
		return timeSpan;
	}
}
@@ -109,16 +109,55 @@
 rgs) %7B%0D%0A
+%09%09System.out.print(%22app start!%5Cr%5Cn%22);%0D%0A
 %09%7D%0D%0A%09%0D%0A%09

add start log