If you want to time a segment of code you may do the following. Instantiating Timer is equivalent to Timer.start(). Timer t = new Timer(); String val = searchForStuff(); System.out.println("It took " ...
This is a Plasma 5 applet that shows window buttons in your panels. This plasmoid is coming from Latte land but it can also support Plasma panels.