English 中文(简体)
时间越长越权?
原标题:Does timer take more CPU power?

I ve used timer and I found it very helpful while taking decisions in seconds or milliseconds. Now I have strong feelings that continuous running of timer gradually increases consumption of processor cycles.

我先提出申请(C#),并用时标执行每1 000毫秒(1秒)的三项指示。 我注意到,在5分钟申请之后,CPU的电力消耗量为5%,10分钟后为10%。

如果这一进展保持不变,那么如果我提出我的申请,在4-5小时之后将会出现什么情况?

我是否应避免过度使用时间?

private void currentTime_Tick(object sender, EventArgs e)
{
   label1.Text = DateTime.Now.ToString("HH:mm:ss tt");
   label2.Text = dt.AddSeconds(i).ToString("HH:mm:ss");
   i++;
}
问题回答

在我看来,时间本身不是原因,而是要求得到指示。 你们是否在你的指示中制造物体,或者说什么是分开的? 开始看管或分配资源,并停止使用,肯定会导致你描述的行为。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签