package com.gingersoft.supply_chain.mvp.utils;

import com.gingersoft.gsa.cloud.app.GsaCloudApplication;
import com.gingersoft.gsa.cloud.common.utils.toast.ToastUtils;

/**
 * @author 宇航.
 * User: admin
 * Date: 2021/2/6
 * Time: 17:21
 * Use:
 */
public class DoubleClickUtils {
    private static long lastClickTime = 0;

    public static boolean isFastDoubleClick() {
        long nowTime = System.currentTimeMillis();
        if (nowTime - lastClickTime < 500) {//500ms
            ToastUtils.show(GsaCloudApplication.getAppContext(), "請慢一點");
            return true;
        }
        lastClickTime = nowTime;
        return false;
    }

}
