示例#1
0
        private async Task CalculatePrimes()
        {
            BusyOverlayService?.SetBusyState(BusyEnum.Busy);
            await Task.Delay(1);

            var stopwatch = new Stopwatch();

            stopwatch.Start();
            Primes = PrimeService?.FindPrimeNumbersUpTo(MaxNumber);
            stopwatch.Stop();

            TimeElapsedMs = stopwatch.ElapsedMilliseconds;

            BusyOverlayService?.SetBusyState(BusyEnum.NotBusy);
        }