making c++ stop and restart functuin at specific time
-
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 -
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@duse GetSystemTime and GetLocaltime functions instead . gettick count and determining the Actual time may not me precise. haribabu