Windows下创建进程和线程(Console下使用API)[20]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

       }

      

       threadNum=parseArgToInt(argv[1]);

       runTime=parseArgToInt(argv[2]);

       //Get the time the threads should run,runtime

       //Calculate time to halt

//     runTime=60;/*in seconds.*/

       GetSystemTime(&now);

printf("mthread:Suite starting aty system time%d,%d,%d\n",now.wHour,now.wMinute,now.wSecond);

       stopTimeSecond=(now.wSecond+(WORD)runTime)%60;

       stopTimeMinute=now.wMinute+(now.wSecond+(WORD)runTime)/60;

       //FOR 1 TO N

       INTEGER* tmpInt;

       for(i=0;i<threadNum;i++)

       {

              //CREATE A NEW THREAD TO EXECUTE SIMULATED WORK;

              //threadWork(i);

本文关键:Windows下创建进程和线程(Console下使用API)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top