public void MarkMotion(DateTimeOffset time) { CheckTurnOffTimeOut(time); LastMotion.SetTime(time); SetProbability(Probability.Full); CheckAutoIncrementForOnePerson(time); _TurnOffTimeOut.IncrementCounter(); }
public async Task MarkMotion(DateTimeOffset time) { CheckTurnOffTimeOut(time); LastMotion.SetTime(time); await SetProbability(Probability.Full).ConfigureAwait(false); CheckAutoIncrementForOnePerson(time); _TurnOffTimeOut.IncrementCounter(); }
private void DecrementNumberOfPersons() { if (NumberOfPersonsInArea > 0) { NumberOfPersonsInArea--; if (NumberOfPersonsInArea == 0) { LastMotion.UnConfuze(); } } }
/// <summary> /// Take action when there is a move in the room /// </summary> /// <param name="motionTime"></param> /// <returns></returns> public async Task MarkMotion(DateTimeOffset motionTime) { TryTuneTurnOffTimeOut(motionTime); LastMotion.SetTime(motionTime); await SetProbability(Probability.Full); CheckAutoIncrementForOnePerson(motionTime); _turnOffTimeOut.Increment(); Debug.WriteLine($"New timeline: {_turnOffTimeOut.Value.Seconds}s"); }