コード例 #1
0
        private void TaskSaver()
        {
            try
            {
                _evDataLoaded.WaitOne();


                while (true)
                {
                    _evSave.WaitOne();

                    List <CLevelEl> lst = GetCopy();
                    if (lst != null)
                    {
                        _levelsIO.WriteToFile(lst);
                    }



                    // Thread.Sleep(1000);
                }
            }
            catch (Exception e)
            {
                CKernelTerminal.ErrorStatic("CUserLevels.TaskSaver", e);
            }
        }
コード例 #2
0
        private void TaskSaveClusters()
        {
            _dtBefore = DateTime.Now;



            List <CDeal> lstDeals = _clusterPriceM1.GetDealsList();

            _dtAfter = DateTime.Now;

            _isInBuildDealsM1 = false;
            _clusterIO.WriteToFile(lstDeals);
            _isInSaving = false;

            _dtLastSaveTime = DateTime.Now;



            _deltMSecs = (_dtAfter - _dtBefore).TotalMilliseconds;
        }