Hi, or just try the standard feature, Register Time.
Register Time
Specifies whether to register users' time usage defined as the time spent from when a user logs in to when the user logs out. Unexpected interruptions, such as idle session timeout, terminal server idle session timeout, or a client crash are not recorded. This setting can be overruled per user by filling in the Register Time field in the User Setup window.


Hope this will help.
Thanks.
ZHU