Try this,..long etime=System.currentTimeMillis();boolean success=processYourAction();etime= System.currentTimeMillis()-etime;System.out.println("elapsed time for my aciton:"+ etime);....