I can think of two way to do it. You can improvise on that.
1) Whenever workobject is opened, it calls pyDefault data transform. Every start may have the property to record the timestamp.
2) whenever the workobject is open, the lock is acquired, and this will be present in pr_sys_locks table. We can utilize this to get the time for what time the work object remained open. if the user dont close the case, then we have to handle the scenario of soft lock.