コード例 #1
0
ファイル: SpinWaitGroup.cs プロジェクト: lsoft/Others
        public SpinWaitGroup(
            PerformanceTimer performanceTimer
            )
        {
            if (performanceTimer == null)
            {
                throw new ArgumentNullException("performanceTimer");
            }

            _performanceTimer = performanceTimer;
        }
コード例 #2
0
ファイル: SpinWaitGroupFactory.cs プロジェクト: lsoft/Others
        public IWaitGroup CreateWaitGroup(
            PerformanceTimer performanceTimer
            )
        {
            if (performanceTimer == null)
            {
                throw new ArgumentNullException("performanceTimer");
            }

            return
                new SpinWaitGroup(performanceTimer);
        }
コード例 #3
0
ファイル: MonitorWaitGroup.cs プロジェクト: lsoft/Others
        public MonitorWaitGroup(
            PerformanceTimer performanceTimer
            )
        {
            if (performanceTimer == null)
            {
                throw new ArgumentNullException("performanceTimer");
            }

            _performanceTimer = performanceTimer;
            
            _waitGroup = new MonitorEventGroup(
                MonitorEventTypeEnum.Manual,
                MonitorEventTypeEnum.Auto
                );
        }
コード例 #4
0
ファイル: TestTask.cs プロジェクト: lsoft/Others
        public TestTask(
            int repeatCount,
            long microsecondsBetweenAwakes,
            long[] times
            )
            : base(Guid.NewGuid(), microsecondsBetweenAwakes)
        {
            if (times == null)
            {
                throw new ArgumentNullException("times");
            }

            _repeatCount = repeatCount;
            _times = times;
            _timer = new PerformanceTimer();
        }
コード例 #5
0
ファイル: StandardWaitGroup.cs プロジェクト: lsoft/Others
        public StandardWaitGroup(
            PerformanceTimer performanceTimer
            )
        {
            if (performanceTimer == null)
            {
                throw new ArgumentNullException("performanceTimer");
            }

            _performanceTimer = performanceTimer;

            _events = new WaitHandle[]
            {
                _stop,
                _restart,
            };
        }