title: How can I count time in Python 3?
body: <p>I want a code that shows the complete time someone has been in a voice channel, but I don't know how to start and stop a counter.</p>
  <pre class="lang-py prettyprint-override"><code>@bot.event
  async def on_voice_state_update(before, after):
  
      if after.voice.voice_channel:
          timestrr = time.strftime(&quot;%d.%m.%Y-%H:%M:%S&quot;)
          voicezeit(after.id, timestrr)
  #here should a timer start
      else:
           #and here should the timer stop
  </code></pre>