If you are talking about the Community Events, like the current CS:GO event, those are tracked by how much time Steam thinks you have the game running - not specifically by how much you are actually playing. If there were rewards for who had the game running longest, it would probably just boil down to whoever started the game closest to the start time and closed it closest to the end time. That probably isn't the desired result for the event.