Live data from Hacker News

How to programmatically find out if computer is on

haiku-os.org

1–10 of 197 posts

Re: How to programmatically find out if computer is on

#5

> If the computer isn't on, the value returned by this function is undefined. Shouldn't it just block until the computer turns back on? Probably interferes with pthreads.

Hmm, it seems like you need to make sure the computer is on before calling this function, or else you run the risk of getting back undefined data. Seems like we also need a function that can be used to tell if the computer is on...
Post reply on HN