In unix, is it possible to estimate the total activate duration of particular window?
Let say i launch an x-term, when the mouse is inside the xterm (active), the counter start. On the other hand, when the mouse is outside (de-avtive) xterm, the counter pause. While the time i exit the xterm, the counter can tell me how much time the xterm is actuvated compared to the time it being launched.
Expert out there, is it possible to do this? Anyone please help me.