If you are able to get access to the Case record (...
# suitescript
b
If you are able to get access to the Case record (no need to do anything with the employee record) I would suggest looking into setting up a workflow. This would allow a variable local to the workflow to store the date/time the case was assigned, and then calculate the duration upon closure.