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. C++ timer question

C++ timer question

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiontutorial
2 Posts 2 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.
  • M Offline
    M Offline
    Manu81
    wrote on last edited by
    #1

    hai, I am working on VC++ win32.I am creating a timer that decrements a counter every second(in Dlg Procedure).I have class where I have to reset the value of the timer.I am thinking of how to do this? ie. //main.cpp int g_counter = 10; main() { ///here i decrement the timer every second } // myclass.cpp int myclass::myfunction() { ///here i want to set g_counter = 10;////how should i exactly do it.. }

    D 1 Reply Last reply
    0
    • M Manu81

      hai, I am working on VC++ win32.I am creating a timer that decrements a counter every second(in Dlg Procedure).I have class where I have to reset the value of the timer.I am thinking of how to do this? ie. //main.cpp int g_counter = 10; main() { ///here i decrement the timer every second } // myclass.cpp int myclass::myfunction() { ///here i want to set g_counter = 10;////how should i exactly do it.. }

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      manu81 wrote: ///here i decrement the timer every second What function are you using to establish the timer? manu81 wrote: ///here i want to set g_counter = 10;////how should i exactly do it.. You mean besides:

      g_counter = 10;


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      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