timers timers are startedas with threadsby calling their start(method the timer can be stopped (before its action has begunby calling the cancel(method the interval the timer will wait before executing its action may not be exactly the same as the interval specified by the user as another thread may be running when the timer wishes to start the signature of the timer class constructor istimer(intervalfunctionargs nonekwargs nonean example of using the timer class is given belowfrom threading import timer def hello()print('hello'print('starting' timer( hellot start(print('done'in this case the timer will run the hello function after an initial delay of the global interpreter lock the global interpreter lock (or the gilis global lock within the underlying cpython interpreter that was designed to avoid potential deadlocks between multiple tasks it is designed to protect access to python objects by preventing multiple threads from executing at the same time for the most part you do not need to worry about the gil as it is at lower level than the programs you will be writing howeverit is worth noting that the gil is controversial because it prevents multithreaded python programs from taking full advantage of multiprocessor systems in certain situations this is because in order to execute thread must obtain the gil and only one thread at time can hold the gil (that is the lock it representsthis means that python acts like single cpu machineonly one thing can run at time thread will only give up the gil if it sleepshas to wait for something (such as some /