Script to manage user time

Visual Studio15
I am trying to create a script to calculate the time a user's screen is

not locked. For example the start time would be from logon ->

screensaver lock while away for lunch ->unlocked computer ->locked

computer when leaving for the day. If any one has any direction on this

it would be greatly appreciated. Thank you.


-