[c/c++]在使用循环去查询消息等操作时加入Sleep()

/ 4,277评论 / 18725阅读 / 0点赞

加入比较短时间的Sleep()一般对时效性影响不大,但能极大地降低CPU占用。

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

int main()
{
	cout << "<< 按任意键继续... ";
	for (int i = 0; _kbhit() == 0;)	//等待按键
	{
		switch (i++)	//选择打印最后的一个字符,使之有动画效果
		{
		case 0:cout << "\b/"; break;
		case 1:cout << "\b-"; break;
		case 2:cout << "\b\\"; break;
		case 3:
		{
			cout << "\b|";
			i = 0;
		}break;
		}
		//Sleep(100);    //暂停100毫秒(1秒 = 1000毫秒)
	}
}
  1. ThomasWaype说道:

    п»їlegitimate online pharmacies india: indian pharmacies safe – Online medicine order

  2. Charlesbiort说道:

    https://drugs1st.store/# erectile dysfunction natural remedies

  3. Charlesbiort说道:

    http://drugs1st.store/# pain meds without written prescription

  4. Charlesbiort说道:

    https://drugs1st.store/# buy prescription drugs from india

  5. Robertolom说道:

    mexican online pharmacies prescription drugs: mexico drug stores pharmacies – buying from online mexican pharmacy

  6. Emersoncon说道:

    pharmacy website india world pharmacy india top 10 pharmacies in india

  7. Robertolom说道:

    india online pharmacy: indian pharmacy – top 10 online pharmacy in india

  8. ThomasWaype说道:

    mexican border pharmacies shipping to usa: best online pharmacies in mexico – mexican border pharmacies shipping to usa

  9. Robertolom说道:

    mail order pharmacy india: indian pharmacies safe – pharmacy website india

  10. Robertolom说道:

    mexico drug stores pharmacies: medicine in mexico pharmacies – mexican border pharmacies shipping to usa

  11. ThomasWaype说道:

    buying prescription drugs in mexico: pharmacies in mexico that ship to usa – reputable mexican pharmacies online

  12. Emersoncon说道:

    mexican mail order pharmacies mexican border pharmacies shipping to usa mexican border pharmacies shipping to usa

  13. ThomasWaype说道:

    best online pharmacies in mexico: pharmacies in mexico that ship to usa – mexico drug stores pharmacies

  14. Robertolom说道:

    mexico pharmacies prescription drugs: mexican border pharmacies shipping to usa – mexico drug stores pharmacies

  15. Emersoncon说道:

    mexican mail order pharmacies pharmacies in mexico that ship to usa mexican online pharmacies prescription drugs

  16. Charlesbiort说道:

    https://indianpharm1st.com/# indianpharmacy com

  17. Robertolom说道:

    ed pills that work: best canadian pharmacy online – errection problems

  18. Charlesbiort说道:

    http://drugs1st.store/# natural ed remedies

  19. ThomasWaype说道:

    pharmacy website india: world pharmacy india – indianpharmacy com

  20. Charlesbiort说道:

    http://indianpharm1st.com/# buy medicines online in india

  21. Robertolom说道:

    mexican mail order pharmacies: buying from online mexican pharmacy – buying from online mexican pharmacy

  22. Robertolom说道:

    buy prescription drugs from india: reputable indian pharmacies – reputable indian pharmacies

  23. ThomasWaype说道:

    how to cure ed naturally: non prescription erection pills – best treatment for ed

  24. Robertolom说道:

    mexico drug stores pharmacies: buying from online mexican pharmacy – buying prescription drugs in mexico

  25. Robertolom说道:

    indian pharmacy paypal: п»їlegitimate online pharmacies india – reputable indian online pharmacy

  26. ThomasWaype说道:

    remedies for ed: male ed drugs – ed pills online pharmacy

  27. Charlesbiort说道:

    https://indianpharm1st.com/# mail order pharmacy india

  28. Robertolom说道:

    Online medicine order: buy prescription drugs from india – mail order pharmacy india

  29. Emersoncon说道:

    buy prescription drugs from india buy medicines online in india india online pharmacy

  30. ThomasWaype说道:

    ed solutions: viagra without doctor prescription – prescription drugs online

  31. Charlesbiort说道:

    https://mexicanpharm1st.com/# buying prescription drugs in mexico online

  32. Charlesbiort说道:

    http://drugs1st.store/# treating ed

  33. Emersoncon说道:

    best drugs for ed erectyle disfunction drugs prices

  34. Charlesbiort说道:

    http://drugs1st.store/# ed solutions

  35. Robertolom说道:

    india pharmacy mail order: reputable indian pharmacies – best online pharmacy india

  36. ThomasWaype说道:

    impotance: erectal disfunction – ed treatment options

  37. Robertolom说道:

    indian pharmacy online: indian pharmacy online – top 10 online pharmacy in india

  38. moodle 掲示板说道:

    25 of the teen have been part of some online conflict that triggered face-to-face hassle with different people.

  39. Then again, traditional typewriters rely solely on mechanical power, providing a extra tactile and audible typing experience.

  40. Emersoncon说道:

    medication from mexico pharmacy п»їbest mexican online pharmacies mexico pharmacies prescription drugs

  41. Emersoncon说道:

    best cure for ed ed pills that really work which ed drug is best

  42. ThomasWaype说道:

    world pharmacy india: indian pharmacies safe – reputable indian online pharmacy

  43. And when you ever run into any Kiwis out on this planet, you will be ready to hold on a dialog that entails something close to and dear to their hearts.

  44. Robertolom说道:

    mexican online pharmacies prescription drugs: pharmacies in mexico that ship to usa – pharmacies in mexico that ship to usa

  45. うつ病波1日说道:

    This enables the drywall sander to reach right into corners, something none of its competitors offer.

  46. 7 February 1979: England transfer to the top of their European Championship qualifying group with an emphatic 4-zero win over Northern Eire at Wembley.

  47. Horvath posted a trio of consecutive clear sheets in opposition to AS Monaco, Borussia Dortmund, and Atlético Madrid in the UEFA Champions League group stage.

  48. Charlesbiort说道:

    http://mexicanpharm1st.com/# mexican online pharmacies prescription drugs

  49. To figure the credit, enter the amounts you paid for this stuff on the appropriate lines of Form 5695, Part II.

  50. Robertolom说道:

    best ed solution: how to get prescription drugs without doctor – men with ed

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注