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

io.virtdata.random.Murmur3Time Maven / Gradle / Ivy

There is a newer version: 2.12.15
Show newest version
package io.virtdata.random;


import io.virtdata.core.murmur.Murmur3F;

import java.util.function.LongUnaryOperator;

/**
 * A generator that is mostly useless, except for testing useless generators.
 * This is used as a control for the concurrent generation tester.
 */
public class Murmur3Time implements LongUnaryOperator {
    private Murmur3F murmur3F = new Murmur3F(Thread.currentThread().getName().hashCode());
    @Override
    public long applyAsLong(long operand) {
        murmur3F.updateLongLE(System.nanoTime());
        return murmur3F.getValue();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy