mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
15 lines
358 B
Python
15 lines
358 B
Python
import time
|
|
import threading
|
|
|
|
|
|
class BaseThread(threading.Thread):
|
|
def __init__(self, name, *args, **kwargs):
|
|
super().__init__(name=name, *args, **kwargs)
|
|
self._thread_started = time.time()
|
|
|
|
def _threadinfo(self):
|
|
return "%s - age: %is" % (
|
|
self.name,
|
|
int(time.time() - self._thread_started)
|
|
)
|