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

/ 4,280评论 / 18729阅读 / 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说道:

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

  2. Robertolom说道:

    best ed treatment pills: natural pills for ed – online drugs

  3. ThomasWaype说道:

    indian pharmacy: buy prescription drugs from india – indian pharmacy online

  4. His form for Metz earned him a recall to the Japan nationwide staff, the place he went on to reclaim the primary jersey.

  5. Charlesbiort说道:

    http://mexicanpharm1st.com/# pharmacies in mexico that ship to usa

  6. Charlesbiort说道:

    https://drugs1st.store/# 100mg viagra without a doctor prescription

  7. What’s ATM entry like in USA & Canada?

  8. Robertolom说道:

    buy prescription drugs from india: india online pharmacy – online shopping pharmacy india

  9. ThomasWaype说道:

    100mg viagra without a doctor prescription: drugs prices – ed pills

  10. Robertolom说道:

    erection pills viagra online: how to cure ed naturally – buy cheap prescription drugs online

  11. Emersoncon说道:

    reputable indian pharmacies india online pharmacy top 10 pharmacies in india

  12. Robertolom说道:

    mexican drugstore online: buying prescription drugs in mexico – reputable mexican pharmacies online

  13. Robertolom说道:

    ed problems treatment: ed pills comparison – buy prescription drugs from canada cheap

  14. ThomasWaype说道:

    Online medicine home delivery: online shopping pharmacy india – best india pharmacy

  15. Charlesbiort说道:

    http://mexicanpharm1st.com/# mexican drugstore online

  16. Robertolom说道:

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

  17. Charlesbiort说道:

    http://drugs1st.store/# cure for ed

  18. ThomasWaype说道:

    mexican rx online: mexican border pharmacies shipping to usa – purple pharmacy mexico price list

  19. Charlesbiort说道:

    http://mexicanpharm1st.com/# mexico drug stores pharmacies

  20. Emersoncon说道:

    ed in young men ed treatment options prescription drugs without prior prescription

  21. Charlesbiort说道:

    http://mexicanpharm1st.com/# purple pharmacy mexico price list

  22. ThomasWaype说道:

    mexican mail order pharmacies: mexican drugstore online – buying prescription drugs in mexico online

  23. Emersoncon说道:

    best online pharmacies in mexico mexican pharmaceuticals online п»їbest mexican online pharmacies

  24. Сервисный центр предлагает качественый ремонт стиральной машины asko выездной ремонт стиральных машин asko

  25. Robertolom说道:

    online pharmacy india: top online pharmacy india – india pharmacy

  26. Robertolom说道:

    buy prescription drugs from canada: ed cures that actually work – ed medications list

  27. ThomasWaype说道:

    mexico drug stores pharmacies: buying prescription drugs in mexico – best online pharmacies in mexico

  28. Robertolom说道:

    cheapest online pharmacy india: india pharmacy – buy medicines online in india

  29. Robertolom说道:

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

  30. ThomasWaype说道:

    pharmacy website india: indian pharmacy online – mail order pharmacy india

  31. Robertolom说道:

    medication from mexico pharmacy: reputable mexican pharmacies online – medicine in mexico pharmacies

  32. Robertolom说道:

    buying prescription drugs in mexico online: reputable mexican pharmacies online – mexico pharmacies prescription drugs

  33. Charlesbiort说道:

    http://mexicanpharm1st.com/# mexican drugstore online

  34. Charlesbiort说道:

    https://drugs1st.store/# natural help for ed

  35. Emersoncon说道:

    mail order pharmacy india п»їlegitimate online pharmacies india indian pharmacies safe

  36. ThomasWaype说道:

    pharmacies in mexico that ship to usa: mexican rx online – mexican mail order pharmacies

  37. Charlesbiort说道:

    https://mexicanpharm1st.com/# medication from mexico pharmacy

  38. ThomasWaype说道:

    india pharmacy mail order: top 10 pharmacies in india – Online medicine home delivery

  39. Robertolom说道:

    best drug for ed: best medicine for ed – herbal ed remedies

  40. Shellie Warhol说道:

    This just made my day! Thank you!

  41. ThomasWaype说道:

    mexican border pharmacies shipping to usa: п»їbest mexican online pharmacies – mexican pharmaceuticals online

  42. They don’t consider it with distinctions,’ says novelist Marina Budhos.

  43. Robertolom说道:

    cheap medications: medication drugs – canadian pharmacy

  44. Emersoncon说道:

    best online pharmacy india top online pharmacy india reputable indian pharmacies

  45. Robertolom说道:

    pharmacies in mexico that ship to usa: mexican pharmaceuticals online – buying from online mexican pharmacy

  46. Emersoncon说道:

    reputable mexican pharmacies online purple pharmacy mexico price list mexican border pharmacies shipping to usa

  47. ErnestLom说道:

    пинап кз: пин ап кз – пин ап кз

  48. ErnestLom说道:

    пин ап казино: пинап кз – пинап

  49. Jamesesown说道:

    canl? casino siteleri casino sitesi h?zl? casino

  50. DavidBeiff说道:

    https://1wintr.fun/# canl? casino siteleri
    пин ап казино

发表回复

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