using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Model.Monitor { /// /// 实时段 /// public class RealSlot : JsonModel, ICronSlot { /// /// 步长 秒数 /// public int TimeStep { get; set; } = 120; /// /// 允许漏点数 /// public int AllowLeak { get; set; } = 1; /// /// 改变时更新 /// public bool UpdateWhenChanged { get; set; } /// /// 中断间隔 /// public int? BreakSpace { get; set; } /// /// 获取开始时间 /// public DateTime GetStartTime(DateTime rhs) { var dt = rhs.AddSeconds(-(AllowLeak + 1) * TimeStep); return dt; } /// /// 获取结束时间 /// public DateTime GetEndTime(DateTime rhs) { return rhs; } } }