A simple question about the use of a timer.
#1

Hello,

Is it needed to use KillTimer if the timer stops by itself anyway ?
pawn Код:
SetTimer("message", 1000, false);
I want to know that because i need a timer without using a value and i cant use killtimer then.
Reply
#2

If a timer is not repeating you don't need to destroy it, it will automatically be disposed when it ends.
Reply
#3

As u see last parameter of settimer is false that means timer will stop after specified time in ur case 1sec, if last parameter is true then timer go on forever until it is killed manually
Reply
#4

Okay thanks i needed to be sure. couldnt find it on the wiki on timers that are set to false.
Reply
#5

There are still times when non-repeating timers need to be killed too... especially for timers that have a long duration time, depending on their use.

From what it looks like, I don't think you will need to be killing a 1 second timer for any reason.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)