Thursday, November 19, 2015

VC++ scheduler/timer and other sources

http://download.csdn.net/detail/Jeffrey_Ming/1195343
http://blog.csdn.net/clever101/article/details/47756047
http://download.csdn.net/detail/hero20025627hxh/1663637
http://download.csdn.net/detail/zhouzhenyang1990/3075088
http://download.csdn.net/detail/s672038161/3206737
http://download.csdn.net/detail/houhuijuan/3446698
http://download.csdn.net/detail/notsunny/8740609
http://download.csdn.net/detail/sunanguo/880743

http://download.csdn.net/detail/fish_1001/8604645

#include <ctime>
#include <iostream>
#include <windows.h>
using namespace std;

int main() {
    while(true){
        time_t t = time(0);   // get time now
        struct tm * now = localtime( & t );
        if(now->tm_min>39){//begin
        cout << "current min " << now->tm_min << ", sec = " << now->tm_sec << endl;
        }
        if(now->tm_min>40){//end
        cout << "will break, current min " << now->tm_min << ", sec = " << now->tm_sec << endl;
        break;
        }
        Sleep(3000);
    }
}

No comments:

Post a Comment