
jcurses.util.Profiler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcurses Show documentation
Show all versions of jcurses Show documentation
Internal Version of JCurses for use with Kolja. For projects please use http://sourceforge.net/projects/javacurses/
The newest version!
package jcurses.util;
/**
* This a library-intern class for performance meausrement.
* The class isn't needed to develop jcurses applications
*/
public class Profiler {
private static long [] marks = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
public static void setMark(int index) {
if ((index < 0) || (index > 9)) {
throw new RuntimeException("illegal index");
}
marks[index] = System.currentTimeMillis();
}
public static void time(String message,int index) {
long time = System.currentTimeMillis()-marks[index];
Protocol.debug(message+": "+time);
}
public static long getMarkTime(int index) {
return marks[index];
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy