Timeout method
in
Programming Questions
•
2 years ago
Hi All,
I want to execute a method for a given length of time and then stop it; At the moment my method execution is controlled by a boolean var like that
if (start) method();
so what I wanto to achieve is to keep value start true for a given time and then switch to false. How to do it quite easily?
I want to execute a method for a given length of time and then stop it; At the moment my method execution is controlled by a boolean var like that
if (start) method();
so what I wanto to achieve is to keep value start true for a given time and then switch to false. How to do it quite easily?
1