@remiduchalard, there is no timer problem. Just reinventing the wheel for learning propose, nothing more. Regarding improving. All code can be improved, even the one you think it canāt be 
The ātaskā Iām asking is really simple. Think about the Corona timer.performWithDelay. Try to mimic it, and improve it if you like it for your needs, justify it. But at least do what corona timer does. Do your own way.
I tried to mimic the timer.performWithDelay with some ābonus featuresā.
I also changed how parameters work in the ātimerā function because all my functions accept parameters the same way, with a table.
Corona sometimes uses tables (new version of display.newText) others not really (display.newImage, etc.). I just try to make them all the same way. So itās easier for me to not forget how they work. I really have a bad memory.
I added the āelapsedTimeā variable so it can be used as a counter without any additional code. So, if you need a counterā¦this timer can do that also.
Added also, āautoremoveāĀ parameter for simplifying the process when we need a simple timer used 1 time in a scene and you will not need it again. I donāt need this function since I put all my timers in a table and delete them when I leave the scene, but maybe someone else doesnāt do what I do and needs to delete them 1 by 1, this could be useful.
Added āautostartā. declared to false, you can simply declare all your timers at the beginningĀ of you codeā¦and just use timer1.start() when you need it. It will be a faster call than creating a new timer. In intensive fps apps this could be usefulĀ since it will not micro-lag when itās called. You can also reuse the sameĀ timer, so this means faster access also to the timer since you donāt need to create another timer if you need one later.
If you need a better pause systemĀ or another feature Iām not thinking about just create it 
My goal is not the timer itself, but the way you create it. English is not my first language and I canāt explain it better than this.
If I was a teacher and asked 10 students to make a timer. If none copied, I would get 10 different codes and all doing the same(if I asked specifically what the timer should do). Since I know there are good programmers here, I was just asking to share the code of a common task so we could learn from each other.
Maybe you will use OOP, maybe you wonāt. Since Lua is not a real OOP languageĀ if you use it, there are different ways of āsimulatingā it. Seeing your implementation itself could be a learning experience.
Maybe you will use metatables or not. Thatās not important. Whatās important is why you used it the way you did.