计算机应用
計算機應用
계산궤응용
COMPUTER APPLICATION
2012年
z2期
144-146
,共3页
程江洲%常俊晓%徐浩%刘林
程江洲%常俊曉%徐浩%劉林
정강주%상준효%서호%류림
定时嚣控件%时间间隔属性%使能属性%定时器事件%定时
定時囂控件%時間間隔屬性%使能屬性%定時器事件%定時
정시효공건%시간간격속성%사능속성%정시기사건%정시
Visual Basic 6.0自带的Timer(定时器)控件的Interval(时间间隔)属性,可用来设置两次触发Timer事件的时间间隔,实现定时功能.由于系统硬件和该属性固有的限制,定时程序在运行过程中会出现定时误差大和时间间隔有限等不足,其定时误差约为5%.针对这两个问题,介绍了如何利用主动查询对比系统时间的算法,不断修正Timer控件的定时误差,防止误差的累积,从而实现高精度定时和任意整数秒时间间隔定时.经过实验测试,该算法可消除定时器的固有误差,达到无误差定时.
Visual Basic 6.0自帶的Timer(定時器)控件的Interval(時間間隔)屬性,可用來設置兩次觸髮Timer事件的時間間隔,實現定時功能.由于繫統硬件和該屬性固有的限製,定時程序在運行過程中會齣現定時誤差大和時間間隔有限等不足,其定時誤差約為5%.針對這兩箇問題,介紹瞭如何利用主動查詢對比繫統時間的算法,不斷脩正Timer控件的定時誤差,防止誤差的纍積,從而實現高精度定時和任意整數秒時間間隔定時.經過實驗測試,該算法可消除定時器的固有誤差,達到無誤差定時.
Visual Basic 6.0자대적Timer(정시기)공건적Interval(시간간격)속성,가용래설치량차촉발Timer사건적시간간격,실현정시공능.유우계통경건화해속성고유적한제,정시정서재운행과정중회출현정시오차대화시간간격유한등불족,기정시오차약위5%.침대저량개문제,개소료여하이용주동사순대비계통시간적산법,불단수정Timer공건적정시오차,방지오차적루적,종이실현고정도정시화임의정수초시간간격정시.경과실험측시,해산법가소제정시기적고유오차,체도무오차정시.