Ejemplo n.º 1
0
        /// <summary>
        /// Operating cycle running in a separate thread.
        /// </summary>
        private void Execute()
        {
            while (!terminated)
            {
                if (pointQueue.Count > 0)
                {
                    pointQueue.InsertPoints();
                }

                Thread.Sleep(ScadaUtils.ThreadDelay);
            }
        }
Ejemplo n.º 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);
            }
        }