Results 1 to 10 of 12

Thread: How to delay without polling?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How to delay without polling?

    Hello everyone!
    As I am trying to write a small demo, I stumbled on this problem:
    Let's deviate from my demo and go to a simple repeat loop that does write an increasing integer and outputs every one second (using getticount64). If I put sleep or delay for 1 millisec, the perfromance tanks. I am talking about from about 15.000.000 loops to about 1000 loops. The utilization drops from 100% (one thread) to 0%.
    How to do *something* when a specific time passes, without checking on every tick (and thus eating cpu)?
    Last edited by SilverWarior; 13-07-2022 at 08:48 PM. Reason: Reverting last post edit on request of the post author

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •