Stop / kill calculating a function.
Finish the calculation (cycle) and then decide whether to process the result further or not.
There are trillions of true/false a second, this is how a computer operates.
void Function_Already_in_OnCalculate() { bool My_Button_State=ObjectGetInteger(0,"My_Button",OBJPROP_STATE); if(My_Button_State==true) { My_Called_Function(); } if(My_Button_State==false) { // Kill My_Called_Function } }How can i do that the simpler way please ?
You mean slower ?
Then you can put it in a timer so you can define the interval in MilliSeconds.
You mean slower ?
Then you can put it in a timer so you can define the interval in MilliSeconds.
Hello,
I mean really kill it.
Like it's never existed, and no calculated anymore.
But even if delete all objects, the calculation is still runing.
Maybe the best way,is to change "Processed_Periods = 0;" when button is FALSE. (?)
I need to stop calculating a function because of CPU.
I created a BUTTON.
TRUE state => I call + dysplay my_function.
FALSE state => I hide the dysplayed grapical objects and indications. (but the function is still there and take CPU ressources).
How can I stop / kill the function's calculation ?
Regards.