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. Managed C++/CLI
  4. timer in C++

timer in C++

Scheduled Pinned Locked Moved Managed C++/CLI
c++linuxquestion
5 Posts 3 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
    Karthik Ram
    wrote on last edited by
    #1

    I am using alarm() to time a process. Is there something with which i can measure by milliseconds ? The alarm() in C++ allows only seconds and not anything lesser than that. I did try ftime() and time(),But i need something to timeout automatically. I am using RH linux and g++ 3.2 Thanks

    M D 2 Replies Last reply
    0
    • K Karthik Ram

      I am using alarm() to time a process. Is there something with which i can measure by milliseconds ? The alarm() in C++ allows only seconds and not anything lesser than that. I did try ftime() and time(),But i need something to timeout automatically. I am using RH linux and g++ 3.2 Thanks

      M Offline
      M Offline
      Michael Mac
      wrote on last edited by
      #2

      Try GetTickCount();


      43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

      K 1 Reply Last reply
      0
      • M Michael Mac

        Try GetTickCount();


        43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

        K Offline
        K Offline
        Karthik Ram
        wrote on last edited by
        #3

        I am doing it on Linux with a gcc compiler 3.2

        M 1 Reply Last reply
        0
        • K Karthik Ram

          I am doing it on Linux with a gcc compiler 3.2

          M Offline
          M Offline
          Michael Mac
          wrote on last edited by
          #4

          Ups, I didn't notice.


          43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

          1 Reply Last reply
          0
          • K Karthik Ram

            I am using alarm() to time a process. Is there something with which i can measure by milliseconds ? The alarm() in C++ allows only seconds and not anything lesser than that. I did try ftime() and time(),But i need something to timeout automatically. I am using RH linux and g++ 3.2 Thanks

            D Offline
            D Offline
            dev_chandok
            wrote on last edited by
            #5

            try using signal() u can do anythin with it

            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