using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MWS.Domain.Dto
{
    public class FreeCheckModel
    {
        public int Id { get; set; }
        public bool LastState { get; set; } = false;
        public DateTime LastReceviceTime { get; set; } = DateTime.Now;
        public bool IsTimeout(int? stabilityTime = null)
        {
            if ((DateTime.Now - LastReceviceTime).TotalSeconds >= (stabilityTime ?? 10))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
