import threading
import os


class Timer(threading.Thread):

    def __init__(self, interval, func, param, t_name=None):
        threading.Thread.__init__(self, name=t_name)
        self._finished = threading.Event()
        self.func = func
        self.param = param
        self.set_timer(interval)

    def set_timer(self, interval):
        self.interval = interval

    def stop(self):
        self._finished.set()

    def run(self):
        while 1:
            if self._finished.isSet():
                return
            self.func(*self.param)
            self._finished.wait(self.interval)

f5dc5c28701c33e4ef559489f17d7d7b8e2a887d
<mask token>


class Timer(threading.Thread):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Timer(threading.Thread):

    def __init__(self, interval, func, param, t_name=None):
        threading.Thread.__init__(self, name=t_name)
        self._finished = threading.Event()
        self.func = func
        self.param = param
        self.set_timer(interval)
    <mask token>

    def stop(self):
        self._finished.set()

    def run(self):
        while 1:
            if self._finished.isSet():
                return
            self.func(*self.param)
            self._finished.wait(self.interval)

<mask token>


class Timer(threading.Thread):

    def __init__(self, interval, func, param, t_name=None):
        threading.Thread.__init__(self, name=t_name)
        self._finished = threading.Event()
        self.func = func
        self.param = param
        self.set_timer(interval)

    def set_timer(self, interval):
        self.interval = interval

    def stop(self):
        self._finished.set()

    def run(self):
        while 1:
            if self._finished.isSet():
                return
            self.func(*self.param)
            self._finished.wait(self.interval)

import threading
import os


class Timer(threading.Thread):

    def __init__(self, interval, func, param, t_name=None):
        threading.Thread.__init__(self, name=t_name)
        self._finished = threading.Event()
        self.func = func
        self.param = param
        self.set_timer(interval)

    def set_timer(self, interval):
        self.interval = interval

    def stop(self):
        self._finished.set()

    def run(self):
        while 1:
            if self._finished.isSet():
                return
            self.func(*self.param)
            self._finished.wait(self.interval)
