Unused time of the computer

I want to know how much time my computer is idle to manage work and breaks.
Please implement this function.

I love AW. Thank