コード例 #1
0
ファイル: PostgreCAL.cs プロジェクト: RapidScada/scada-v6
        /// <summary>
        /// Operating cycle running in a separate thread.
        /// </summary>
        private void Execute()
        {
            while (!terminated)
            {
                if (pointQueue.Count > 0)
                {
                    pointQueue.InsertPoints();
                }

                Thread.Sleep(ScadaUtils.ThreadDelay);
            }
        }
コード例 #2
0
        /// <summary>
        /// Operating cycle running in a separate thread.
        /// </summary>
        private void Execute()
        {
            DateTime prevDate = DateTime.UtcNow.Date;

            while (!terminated)
            {
                DateTime today = DateTime.UtcNow.Date;

                if (prevDate != today)
                {
                    prevDate = today;
                    CreatePartition(today, false);
                }

                if (pointQueue.Count > 0)
                {
                    pointQueue.InsertPoints();
                }

                Thread.Sleep(ScadaUtils.ThreadDelay);
            }
        }