Support Board
Date/Time: Sat, 23 Nov 2024 23:42:28 +0000
Post From: Error with Sim Lock & Orders being executed
[2024-07-04 15:32:16] |
ForgivingComputers.com - Posts: 960 |
If you want to know if 15 minutes have passed, save the lock time, then keep checking if the current time is 15 minutes later. SCDateTime& LockDateTime = sc.GetPersistentSCDateTime(1); SCDateTime CurrentDateTime; if (sc.IsReplayRunning()) CurrentDateTime = sc.CurrentDateTimeForReplay; else CurrentDateTime = sc.CurrentSystemDateTime; bool Locked = false; if (!Locked && sc.TradingIsLocked) { LockDateTime = CurrentDateTime; Locked = true; } if (Locked && (CurrentDateTime - LockDateTime ) >= SCDateTime::MINUTES(15)) { sc.SetTradingLockState(0); Locked = false; } Date Time Of Last Edit: 2024-07-04 15:33:02
|