It's always good to track time spent in solving a problem, Leetcode UI should have an inbuilt timer which keeps on ticking.
A user can either start it manually or it can be automatic when user clicks a problem.
This data can later be correated to give avergae problem solving time per user.