All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.protege.owl.diff.util.StopWatch Maven / Gradle / Ivy

Go to download

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