Design and Application of High Resolution Timer Managing Class in C++Builder IDE
LI Xiao-Jing,ZHANG Li-Li,HU Wen-Dong,WEN Zhi-Hong,MA Jin
DOI: https://doi.org/10.3969/j.issn.1003-3254.2013.08.030
2013-01-01
Abstract:This paper present a realization of hi-resolution timer class,based on multithread technique,in the BCB IDE.Utilizing of the class,derived from TThread class of VCL and integrated with Windows message mechanism,achieved a general timing-error < 0.5ms.The class is provided of advantages such as multiple timers-single object managing,work state of timer-thread adjusting,callback mode controlling,as well as more convenient and more customizable than traditional windows System Timer and Multimedia Timer.Thus it could be applied in projects with relatively time-critical requirement,e.g.industrial control,multimedia app development and realtime signal sampling & processing.