Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A little something about timers
#1
The example.

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
and we set
Code:
Variable = !Variable
Then we just

Code:
Call Download(Porn)
like before.
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
part.
Simple, yet effective.
Reply
#2
Thanks man, this is a great way to download porn!
Reply
#3
Happy anniversary.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)