I recently started having to track time on a task + project basis. Was able to throw together a plugin for it, though I have messed around with a few things. I wanted timers to work across devices and to store the time elapsed in Estimated Duration. (reasoning for that included on the article I linked)
So timers are date stamps added to the notes section in a small attachment (Set up that notes section attachment as a library, not sure how good of an idea it is, but it adds generic fields to tasks, which is helpful.) and when you “stop” the timer, it just uses the difference between now and the timestamp.
Got some more info and the plugin file here: