Login Page - Create Account

Support Board


Date/Time: Fri, 18 Oct 2024 08:42:35 +0000



Post From: Is there a way to make the Study wait in ACSIL ?

[2024-06-18 11:01:55]
User61576 - Posts: 443
While sending orders we get error message saying message rate limit exceeded so I want the code to "wait" for 0.5 second and send the order again
But if I add "wait" using this code SC gets unresponsive
sc.UpdateAlways is True and sc.AutoLoop set to 1 by default in the code

This is how I tried to implement the wait

  sc.UpdateAlways=false;
  sc.AutoLoop=0;
  sc.AddMessageToLog("Waiting for 500 ms", 1);
  std::this_thread::sleep_for(std::chrono::milliseconds(500));
  sc.AddMessageToLog("500 ms passed", 1);
  sc.AutoLoop=1;
  sc.UpdateAlways=true;

Is there any better way to solve this issue ?