09-01-2007, 07:16 PM
The example.
2 timers. Intervals at 500, and 1000
The one with 500 has this code:
The one with 1000 has this code:
Timers use ram and CPU. We don't want that.
So, we fix that.
Inside the timer with the 500 interval, we
and we set
Then we just
like before.
However, now we add something else to that sub too :
Now we delete the timer with an interval of 1000, and we're done. We've replaced a timer, and it's sub with just an if statement, a boolean, and the
part.
Simple, yet effective.
2 timers. Intervals at 500, and 1000
The one with 500 has this code:
Code:
Call Download(Porn)
The one with 1000 has this code:
Code:
Call Upload(Porn)
Timers use ram and CPU. We don't want that.
So, we fix that.
Inside the timer with the 500 interval, we
Code:
Dim Variable as Boolean
Code:
Variable = !Variable
Code:
Call Download(Porn)
However, now we add something else to that sub too :
Code:
If Variable = True Then
Call Upload(Porn)
End If
Now we delete the timer with an interval of 1000, and we're done. We've replaced a timer, and it's sub with just an if statement, a boolean, and the
Code:
Variable = !Variable
Simple, yet effective.