Time Tracking

python working time toggl tracking


import sys
import datetime
import keyboard 
import time

timeInSeconds = 0
tillNowTime = 0
startedTime = str(datetime.datetime.now())
rate = 1.2
eq = 0

while True:
	if keyboard.is_pressed("esc"):

	tillNowTime = str(datetime.timedelta(seconds = timeInSeconds))
	eq += rate
	sys.stdout.write("Started at: %s  |  Till now: %s , %s[X]\r" %( startedTime, tillNowTime, str(eq)) )
	timeInSeconds += 1
print("\n--------\nEnded at: " + str(datetime.datetime.now()) + " | Total: " + str(tillNowTime) )


  1. I was just searching for this info for some time. After 6 hours of continuous Googleing, finally I got it in your web site. I wonder what’s the lack of Google strategy that do not rank this kind of informative sites in top of the list. Generally the top web sites are full of garbage.

Leave a Reply

Your email address will not be published. Required fields are marked *