package ru.yandex.autotests.direct.handles.service.utils;

/**
 * Author buhter
 * Date 26.06.14
 */
public class TimeUtils {
    public static String timePassed(long dateTime) {
        String execTimeDisplayValue;
        if (dateTime >= 60000 && dateTime < 3600000) {
            execTimeDisplayValue = dateTime / 60000 + " мин.";
        } else {
            if (dateTime >= 3600000) {
                execTimeDisplayValue = dateTime / 3600000 + " ч. ";
                execTimeDisplayValue = execTimeDisplayValue +
                        Double.valueOf(((dateTime / 3600000d - dateTime / 3600000) * 60)).intValue() + " мин.";
            } else {
                execTimeDisplayValue = "Менее минуты.";
            }
        }
        return execTimeDisplayValue;
    }
}
