Sleep / hibernate doesn't change anything here - if the computer is in those states, no code is running so it doesn't make sense to query for it, which is the joke. The function isn't called was_computer_running().