title: Tkinter - Can I use multiple after functions without them interfering?
body: <p>I'm trying to make a clicker game using python. I'm using tkinter for the GUI. I'm trying to use .after function inside of functions to add an integer to a total number. I have it set up so it adds 1 every second which works fine. I am trying to do this with multiple functions adding 5,10,15 per second. The after function works fine until more than one is going at a time. Once there is multiple the time speeds up and it adds every fraction of a second once they start adding up.</p>
  
  <p>Here is a simplified version of my code:</p>
  
  <pre><code>import tkinter as tk
  
  window = tk.Tk()
  window.geometry("800x700")  #makes the window size 900x700
  window.resizable(0, 0)  #make it so window cannot be resized
  
  total = 0
  def addone():
      global total
      total = total + 1
      add = window.after(1000, addone)
      print(total)
  
  button = tk.Button(command=addone, width=10, height=10)
  button.grid(column=1, row=1)
  
  window.mainloop()
  </code></pre>
  
  <p>Every time the button is clicked the total adds up faster and faster. I can't seem to find a way make it stop this. I am trying to make it add by 1 every second then after the button is clicked add by 2 every second and so on.</p>