Per-task stopwatch intersected with non-afk

How do I get a report based on stopwatch and afk. By this I mean, I would like to know how much I worked on each task I’ve created in stopwatch, but obviously when I was at the keyboard.
Is it possible to easily create something like this currently?
Thank you,