It is necessary to obtain data from a stream of a third-party program, for this it is necessary to switch to idle mode.

QUESTION:

How to make a screen delay for a long time (about 10 minutes)?

I am familiar with the sleep() function, but can there be a better solution for a long screen delay? By delay, I mean the state when the program is idle.

  • four
    What is the "screen delay"? - PinkTux
  • For such purposes is such a long delay? - Alex.B
  • @PinkTux is most likely to be in a state of inactivity when the program is idle - Alex.B
  • can you use a timer on which platform write ?? - Alex.B
  • 2
    Yes, for what purposes. Sometimes WaitForSingleObject will be justified, if without conditions then sleep - nick_n_a

1 answer 1

Well, Sleep is quite a kosher decision. One more thing - sleep :)

If on C ++, you can use sleep_until and sleep_for from <thread> .

  • And plus slips are not knocked down by signals? - PinkTux
  • @PinkTux Um, I was somehow not puzzled by this question ... And how important is it? By and large, the signal is the signal to punch everything ... - Harry
  • I mean, if the delay is needed for an exact time, then maybe it makes sense to spit out alarm() . After that, start to rest, checking - isn't it time to wake up? And the SIGALRM handler will check the current time and, if the signal came earlier, kill the new alarm() for the remaining time. If everything, then interrupt the rest. - PinkTux