Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    public static long lastClickTime;

    public static boolean isFastDoubleClick(int maxTime) {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        Log.i("timetest", "time:" + time + ",timeD:" + timeD);
        lastClickTime = time;
        if (0 < timeD && timeD < maxTime) {
            return true;
        }
        return false;
    }
}