Pause timer temporarely

To add comments, please log in or register
Nico1854
24
Nico1854  

Is it possible to pause the timer.


It looks like EventTimeKiller(); only works with DeInit.


I would like to pause the timer while I execute some orders and then restart the timer once I have finished executing my orders.

nicholi shen
2392
nicholi shen  
Nico1854:

Is it possible to pause the timer.


It looks like EventTimeKiller(); only works with DeInit.


I would like to pause the timer while I execute some orders and then restart the timer once I have finished executing my orders.

What makes you think that it only works from OnDeInit?

Nico1854
24
Nico1854  
Because a check is performed Ontimer and reported with a print. After using the kill timer, the check is still perrformed
Adiasa
226
Adiasa  
Nico1854:
Because a check is performed Ontimer and reported with a print. After using the kill timer, the check is still perrformed
Check your code. Probably you excecute EventSetTimer() after EventTimeKiller() being excecuted
Nico1854
24
Nico1854  

I think that I have spotted the problem.

Afetr EventTimKiller(), I close all pending orders, but without having a sleep between each orderd to close. The loop then ends and the EventSetTimer() is triggered, but straight away, as all orders are not closed, it stops again, closes what's left...


I will add a sleep between each order to close and see if that solves the problem.

To add comments, please log in or register