Simple C app using 50% cpu

后端 未结 6 1672
不思量自难忘°
不思量自难忘° 2021-01-25 03:31

I have a simple C app that uses constant 50%. I don\'t know why but I like to minimize it as much as possible.

#include 
#include          


        
6条回答
  •  悲&欢浪女
    2021-01-25 04:02

    Yes, it's your tight loop in Wait(). You probably have a dual-core machine, so you're using 100% of one core. Use sleep() instead.

提交回复
热议问题