This is a debate among many online instructors. Some say time tracking is a vital feature in an LMS, others say it is useless information and cannot be the basis of a grade.
The problem lies in what can be tracked: time spent in the course. The students might be logging "time" but not interacting with the material. They could be playing video games while the course is open in another window.
That said, there is usually a way to get an idea of your students' activity level in the course. This will vary by LMS, but using Moodle as an example, you can get a general idea by viewing the Activity Logs.
You can see where they went, and how long they stayed in any given place. For example, if the student spent one minute in Topic 2, this could indicate that he did not do the work -- or that he had trouble getting it to load. If a student spent 50 minutes in Topic 1, we do not know if he was struggling with it, watching it multiple times to "get it", or completely distracted and not interacting with it at all.
Because of these limitations, many teachers decide to grade based on learning, proven by scores on quizzes and homework assignments, rather than by time spent.