package com.gem.media.util;

import com.gem.media.RestartAndOnlineTimeStaticsHelper;

public class GKpLiveHelper {


    private static final class KpLiveHelperHolder {
        private static final GKpLiveHelper kpLiveUtil = new GKpLiveHelper();
    }

    public static GKpLiveHelper getInstance() {
        return KpLiveHelperHolder.kpLiveUtil;
    }

    private long initTime = 0L;


    public void init() {
        if (initTime == 0L) {
            initTime = System.currentTimeMillis();
        } else {
            long currentTime = System.currentTimeMillis();
            int minute = (int) ((currentTime - initTime) / 60);
            initTime = currentTime;
            RestartAndOnlineTimeStaticsHelper.checkOnLineTime(minute);
        }
    }
}
