mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
TimersManager is not singleton
This commit is contained in:
parent
64052aa44e
commit
d67a8a5f83
1 changed files with 1 additions and 14 deletions
|
|
@ -2,20 +2,7 @@ from .widget_user_idle import WidgetUserIdle, SignalHandler
|
|||
from pype.api import Logger, config
|
||||
|
||||
|
||||
class Singleton(type):
|
||||
""" Signleton implementation
|
||||
"""
|
||||
_instances = {}
|
||||
|
||||
def __call__(cls, *args, **kwargs):
|
||||
if cls not in cls._instances:
|
||||
cls._instances[cls] = super(
|
||||
Singleton, cls
|
||||
).__call__(*args, **kwargs)
|
||||
return cls._instances[cls]
|
||||
|
||||
|
||||
class TimersManager(metaclass=Singleton):
|
||||
class TimersManager:
|
||||
""" Handles about Timers.
|
||||
|
||||
Should be able to start/stop all timers at once.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue