I want to monitor the times that apps are opened and closed as well as what webpages have been visited on my computer and i don't really know how to go about it. I tried searching for some info, but couldn't find anything. I know that i'll need an app that runs invisibly, that either polls every 5 seconds or so, or i'll need some API that i've never heard of.

Anyway, that's what i want to do, so if anyone could give me some clues, links, tips, code or anything, it would be appreciated.