Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. A question about the sleep() function

A question about the sleep() function

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KaKa
    wrote on last edited by
    #1

    While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?

    L realJSOPR A 3 Replies Last reply
    0
    • K KaKa

      While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      http://www.google.com/search?hl=en&q=MSDN+Thread+tutorial&btnG=Search[^]

      1 Reply Last reply
      0
      • K KaKa

        While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        Only if it's in another thread.

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        1 Reply Last reply
        0
        • K KaKa

          While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?

          A Offline
          A Offline
          Anurag Gandhi
          wrote on last edited by
          #4

          You can use Timer for the function where you have used sleep() function. It is more easier than using thread.

          Anurag Gandhi. http://www.softgandhi.co.nr

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups