|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
timing accuracy of VB.NetDoes anybody know the timing accuracy of VB.Net.
I remember that in VB.60, one can only trigger an event with time accuracy <10ms. How about VB.Net? Was this improved? I am making a project for instrument controlling. The shutter should open for 10~100ms and I am wondering if it's possible or not to do this with VB.Net Hi,
The timer in the component tab is more accurate than the system.windows.forms.timer. Read this article about the types of timers. http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/default.aspx Ken ---------------- Show quoteHide quote "G8 | 8======D" <lijie0***@gmail.com> wrote in message news:1138184985.500445.38330@f14g2000cwb.googlegroups.com... > Does anybody know the timing accuracy of VB.Net. > I remember that in VB.60, one can only trigger an event with time > accuracy <10ms. > How about VB.Net? Was this improved? > I am making a project for instrument controlling. The shutter should > open for 10~100ms and I am wondering if it's possible or not to do this > with VB.Net > "G8 | 8======D" <lijie0***@gmail.com> wrote in message fwiw, that VB6 limitation is caused more by the OS than the language. You news:1138184985.500445.38330@f14g2000cwb.googlegroups.com... > Does anybody know the timing accuracy of VB.Net. > I remember that in VB.60, one can only trigger an event with time > accuracy <10ms. > How about VB.Net? Was this improved? > I am making a project for instrument controlling. The shutter should > open for 10~100ms and I am wondering if it's possible or not to do this > with VB.Net can never rely on the accuracy of a timer >event<. They're extremely low priority on the list of things an OS has to do to keep things running smoothly. Just about anything can prevent or delay the event. On a PC that's running >only your app<, you can get events near 1ms intervals using API based timers in VB6. Probably similar with dotNet apps. I always cache the current time (most of the time, from one of the OSs timers) and calculate how long it's been since the last timer event and use >that< information to determine whether or not a specific period of time has So, imo, get that timer firing as fast as it can and calculate elapsed times elapsed. instead of relying on an event. Once you've determined the accuracy you can actually depend on, you can slow the "ticks" down a bit to avoid flooding the timer event code. Side note: My entire job revolves around instrument control <g> (http://www.tamsci.com/products/products.html). Everything we sell runs on a combination of C and VB5/6. -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups..
throw/handle exceptions while using backgroundworker
DUMB question about IndexOf Strange maximize behaviour Queue of Threads What is the correct case convention for Set? Listbox idiotic example progress bar right to left Importing XML File into an Empty Access Table How to use a Generic's base type? deleting files greater than x days |
|||||||||||||||||||||||