Timer cancellation

If you have a object called “limite” defined as follow:

local limite = display.newText(“time”, 190, 10, nil, 10)

and then a given function to work like a 1 sec timer, like this one:

function limite:timer(event)

do and update something

if (someCondition) then
timer.cancel(event.source) – this cancel timer if condition is true.
end

end

and the following code in Main()

timer.performWithDelay(1000,limite,0) – which gives limite an infinite repetition every 1 sec

What is the best way to cancel timer (limite) outside limite:timer function?

Can I take something like this:

local lim=limite.timer
lim:cancel()
Regards, [import]uid: 3022 topic_id: 382 reply_id: 300382[/import]