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. making c++ stop and restart functuin at specific time

making c++ stop and restart functuin at specific time

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++algorithmsquestion
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.
  • D Offline
    D Offline
    deliad
    wrote on last edited by
    #1

    Hello This function is part from my class in c++ I WANT IT STOP DOING THE IF FROM TIME 04:00AM TO 04:20AM (* IN 04:20AM IT WILL CONTINIUE WORKING) , I tried searching in google alot and i dont successed to do that as i want, can someone show me example how to do that? (this function is doing by a timer.) VOID CALLBACK TimerProc(HWND /*hwnd*/, UINT /*uMsg*/, UINT_PTR /*idEvent*/, DWORD /*dwTime*/) { const DWORD now = GetTickCount(); if (now - lastPlayingTimestamp > hitStartAfterMillis) { lastPlayingTimestamp = now; SendMessage(mod_restless.hwndParent, WM_WA_IPC, 0, IPC_STARTPLAY); } } Deli@d

    K 1 Reply Last reply
    0
    • D deliad

      Hello This function is part from my class in c++ I WANT IT STOP DOING THE IF FROM TIME 04:00AM TO 04:20AM (* IN 04:20AM IT WILL CONTINIUE WORKING) , I tried searching in google alot and i dont successed to do that as i want, can someone show me example how to do that? (this function is doing by a timer.) VOID CALLBACK TimerProc(HWND /*hwnd*/, UINT /*uMsg*/, UINT_PTR /*idEvent*/, DWORD /*dwTime*/) { const DWORD now = GetTickCount(); if (now - lastPlayingTimestamp > hitStartAfterMillis) { lastPlayingTimestamp = now; SendMessage(mod_restless.hwndParent, WM_WA_IPC, 0, IPC_STARTPLAY); } } Deli@d

      K Offline
      K Offline
      kasturi_haribabu
      wrote on last edited by
      #2

      use GetSystemTime and GetLocaltime functions instead . gettick count and determining the Actual time may not me precise. haribabu

      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