Blender Python: Running multiple timers I have a bit of a weird problem that I simply cannot seem to get around. I want to run 2 timers, each set to a different interval.

The problem that I'm having is that both classes receive each others 'TIMER' event! I think that this is really weird, as one would expect the timer event to be constrained within the class it's created in.

After hours of DuckDuckGoing, I found this forum post: https://blenderartists.org/t/how-to-distinguish-timers-when-running-multiple-modal-operators/601432/7

But it didn't help much, basically stating that it's impossible, + it's from 4 years ago, maybe something has changed.

Am I looking at this the wrong way? Maybe I don't really understand Blender's paradigm here, anything that can help me get on the right track would be really appreciated, thanks!

I created a demo blender file showing my problem: https://keybase.pub/peterwilli/StackExchange_Files/TimerProblem.blend

Just open with Blender and look at the console (open blender from the console in Linux) and run timer1.py and timer2.py, what you see is that both timers run each 1 second, but if you run both, both of them run practically twice as fast, taking each other's event.
Application Timers

Blender 2.8 has a new API to run functions in specific time intervals. 

Run a Function every x Seconds

import bpy

def every_2_seconds():
    print("Hello World")
    return 2.0

bpy.app.timers.register(every_2_seconds)


Move an object every second

import bpy
import functools

def move_obj(ob):
    ob.location.x += 0.1
    return 1

bpy.app.timers.register(functools.partial(move_obj, bpy.context.object), first_interval=1)


Similar but passing object time axis and disp

import bpy
import functools

def move_obj(ob, axis, dist, sec):
    print(ob, axis, dist)
    ob.location["xyz".index(axis)] += dist
    return sec

bpy.app.timers.register(functools.partial(move_obj, bpy.context.object, "x", 0.1, 1), first_interval=1)

bpy.app.timers.register(functools.partial(move_obj, bpy.context.object, "y", 2, 10), first_interval=1)

bpy.app.timers.register(functools.partial(move_obj, bpy.context.object, "z", -0.1, 2), first_interval=1)


On a few quick tests it appears that the context, if passed to the timer like above is restricted, has no "object" attribute for example.