package com.stu.assistant.uitls;

import android.util.Log;

public class BtnClickUtil {
    // 两次点击按钮之间的点击间隔不能少于1000毫秒
    private static final int MIN_CLICK_DELAY_TIME = 1000;
    private static long lastClickTime;
    public static boolean getIsOk(){
        long curClickTime = System.currentTimeMillis();
        Log.i("stf","-BtnClickUtil--->"+(curClickTime - lastClickTime));
        if((curClickTime - lastClickTime) >= MIN_CLICK_DELAY_TIME) {
            // 超过点击间隔后再将lastClickTime重置为当前点击时间
            lastClickTime = curClickTime;
            return true;
        }
        return false;
    }
}
