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

org.daisy.common.priority.timetracking.TimeStats Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package org.daisy.common.priority.timetracking;
/**
 * Mantains a snapshot of the {@link TimeTracker} and the reference time used to make comparisions.
 */
public final class TimeStats{
        final long reference; 
        final long[] times;

        /**
         * @param reference
         * @param times
         */
        TimeStats(long reference, long[] times) {
                this.reference = reference;
                this.times = times;
        }

        /**
         * @return the reference
         */
        public long getReference() {
                return this.reference;
        }

        /**
         * Unreferenced times
         * @return 
         */
        public long[] getTimes() {
                return this.times;
        }

        /**
         * References the times and retuns the array
         * @return the times referenced to the reference instant 
         */
        public long[] getReferencedTimes() {
                long[] refd=new long[this.times.length];
                for (int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy