
org.protege.owl.diff.util.StopWatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.protege.owl.diff Show documentation
Show all versions of org.protege.owl.diff Show documentation
Engine for calculating differences between two OWL ontologies. Used by the OWL Difference plug-in for the Protege Desktop ontology editor.
The newest version!
package org.protege.owl.diff.util;
import java.util.logging.Logger;
public class StopWatch {
private Logger logger;
private long start;
private long startOfLastInterval;
public StopWatch(Logger logger) {
this.logger = logger;
start = System.currentTimeMillis();
startOfLastInterval = System.currentTimeMillis();
}
public void measure() {
long now = System.currentTimeMillis();
logger.info("Took " + (now - startOfLastInterval) + "ms");
startOfLastInterval = now;
}
public void finish() {
measure();
logger.info("Total time = " + (startOfLastInterval - start) + "ms");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy