定时器的最大值

发布于 2024-09-28 10:15:34 字数 110 浏览 0 评论 0原文

C# 中定时器工作的最大间隔是多少?

它是int 32的最大值吗?

我可以将其更改为 int 64 吗?

如果我改变,那就是一个很大的如果,计时器还会工作吗?

what is the maximum interval for a timer to work in C#?

is it the maximum value of int 32?

can i change it to int 64?

If i change, that is ONE big IF, will a timer still be working?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执着的年纪 2024-10-05 10:15:34

System.Timers.Timer.Interval

时间间隔,以毫秒为单位
已发生的事件。该值必须是
大于零且小于或
等于Int32.MaxValue。默认
是 100 毫秒。

您无法将 Int64 分配给 Int32(大于 Int32.MaxValue)。

感兴趣的:比较 .NET Framework 类库中的计时器类

System.Timers.Timer.Interval:

The time, in milliseconds, between
Elapsed events. The value must be
greater than zero, and less than or
equal to Int32.MaxValue. The default
is 100 milliseconds.

You cannot assign an Int64 to an Int32 (that is larger than Int32.MaxValue)

Of interest: Comparing the Timer Classes in the .NET Framework Class Library

泪眸﹌ 2024-10-05 10:15:34

奇怪的是,如果您搜索 winforms 计时器,它会出现< /a> 向上。间隔属性是一个 int。

Oddly enough if you search for winforms timer it comes right up. The interval property is an int.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文