Please someone can help me following code......?
for (int B=0; B<5; B=B+TimeNow)
Since time has been converted to int it won't be seconds anymore I guess. How can run the loop for 4 seconds or expire after 4 seconds....?
Do not double post.
I have deleted your other topic.
// Get # of seconds since epoch
int seconds = (int) TimeCurrent();
// Loop for 4 seconds
while ( TimeCurrent() < seconds + 4 )
// Do stuff within 4 seconds
PrintFormat("Count [%d]", TimeCurrent() - seconds);
// Done with 4 second loop
Sorry for the inconvenience. I have tried to delete the other one. I couldn't find a option to delete it.
Thanks Anthony. Can I know one thin if I wrote a trailing SL between 4 sec it will be trailed only for 4 seconds. is it ?
You could build a 4 second limiter this way, but I would probably would not use a loop.
I would probably use a static variable in OnTick() to see when 4 seconds had elapsed.
It's hard to say without seeing your Trailing SL code.
Thanks Anthony. It's running perfectly.