TradeService.cs 502 B

123456789101112131415161718
  1. using System.Threading;
  2. using System.Threading.Tasks;
  3. using Microsoft.Extensions.Hosting;
  4. public class TradeService : BackgroundService
  5. {
  6. protected override async Task ExecuteAsync(CancellationToken stoppingToken)
  7. {
  8. while (!stoppingToken.IsCancellationRequested)
  9. {
  10. int timespan = 50;
  11. await Task.Delay(timespan).ContinueWith(tsk =>
  12. {
  13. // MySystem.ProfitHelper.Instance.StartListenTradeDo();
  14. });
  15. }
  16. }
  17. }