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

io.qameta.allure.entity.WithTime Maven / Gradle / Ivy

There is a newer version: 2.30.0
Show newest version
package io.qameta.allure.entity;

/**
 * @author Dmitry Baev [email protected]
 *         Date: 31.01.16
 */
public interface WithTime {

    void setTime(final Time time);

    default void setTime(final Long start, final Long stop) {
        setTime(new Time()
                .withStart(start)
                .withStop(stop)
                .withDuration((start == null || stop == null) ? null : stop - start)
        );
    }

    default void setTime(final Long duration) {
        setTime(new Time()
                .withDuration(duration)
        );
    }

    Time getTime();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy