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

org.swisspush.gateleen.player.timing.LinearTimingFunction Maven / Gradle / Ivy

package org.swisspush.gateleen.player.timing;

import com.google.common.base.Function;

/**
 * Speeds up timings by a constant factor.
 *
 * @author https://github.com/lbovet [Laurent Bovet]
 */
public class LinearTimingFunction implements Function {

    private double factor;

    public LinearTimingFunction(double factor) {
        this.factor = factor;
    }

    @Override
    public Long apply(Long millis) {
        return (long)(millis / factor);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy