Exemplo n.º 1
0
        public static float CalculateTimeLeft(IdleCounterComponent idleCounter, IdleBeginTimeComponent idleBeginTime, IdleKickConfigComponent config)
        {
            float num  = CalculateIdleTime(idleCounter, idleBeginTime.IdleBeginTime);
            float num2 = config.IdleKickTimeSec - num;

            return((num2 >= 0f) ? num2 : 0f);
        }
Exemplo n.º 2
0
 public static float CalculateIdleTime(IdleCounterComponent idleCounter, Date?idleBeginTime) =>
 (idleBeginTime != null) ? (((float)(((idleCounter.SkipBeginTime == null) ? Date.Now : idleCounter.SkipBeginTime.Value) - idleBeginTime.Value)) - (((float)idleCounter.SkippedMillis) / 1000f)) : 0f;