)我想要构建 2应用程序与vb和c#(分离)
我有1个camrera(一个videocapx)我使用videocapx activex进行相机通信,我需要每秒(或更少)间隔
做快照并与之前的快照进行比较。喜欢运动,但间隔时间不是每一帧。
和其他计时器只计算时间并连接到IO卡,
2个计时器必须一起开始和结束并分享几个变量。
我的问题:
怎么做?只有2个的定时器或者使用其他?
我需要线程吗?
谢谢
Eli
解决方案
根本不要使用计时器......
只需运行一个带循环的后台线程并监控循环执行时间。然后,您可以使用两个单独的计数器变量来跟踪运行时间,并在每个变量达到指定阈值时执行每个过程。
)I want build 2applications with vb and c# (seperated)
I have 1 camrera (one videocapx) i iuse videocapx activex for camera communication and i need each second(or less) interval
to do snapshot and to compare with the one before. like motion but in interval time not each frame.
and other timer just count time and connect to IO card,
the 2 timers must start and end together and share few varibles.
my questions:
how to do it? just 2 timers of or use other?
do i need threads?
Thanks
Eli
解决方案Don't use timers at all...
Just run one background thread with a loop and monitor the loop execution time. You can then use two separate counter variables to keep track of run time and perform each process when each variable reaches the specified threshold.
更多推荐
vb.net计时器
发布评论