计时器滴答事件触发了两次 [英] timer tick event fired twice

查看:133
本文介绍了计时器滴答事件触发了两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在更新面板外使用ajax计时器.
每5秒就会触发Timer_tick事件两次.

我的问题是为什么它会在5秒后触发两次?

我知道间隔是我的设置,例如interval = 5000,但为什么它会同时触发两次是一个谜.

这就是为什么我的应用程序被挂起的原因吗?

I am using ajax timer outside update panel.
Timer_tick event fired twice after every 5 seconds.

My Issue is why it fires twice after 5 seconds?

I know the interval its my setting like interval=5000 but why it fires twice together is a mystery.

Is this why my application get hanged???

推荐答案

确定要这样做吗?

处理刻度线需要多长时间?必须从间隔中减去该时间.
因此,如果您的处理需要几秒钟,它将显示计时器触发两次,而实际上滴答声相隔5秒钟.

干杯
Are you sure it does that?

How long does it take to process the tick? That time must be subtracted from the interval.
So if your processing takes a few seconds, it will appear the timer fires twice, when in fact the ticks come 5 seconds apart.

Cheers


这篇关于计时器滴答事件触发了两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆