Then search vbRC5Base example, feel there should be a high precision timer in it? Anyway is not found, is to find a cPhysicsEngine this stuff, should be a animation engine and things like that, is not very familiar with, that it is just one example, used as a time event, suddenly feel full of imagination, so also can? Experiment under this thing can't set a time interval, I think this is not much of a problem, can add delay, it seems that no reentrant problems, use good simple, is such a usage? There is a problem? Feel so dizzy was used?
That example:
'in this case, we use only the timing - events (no real physical here in this demo)
'the from this instance, we use only its nice Timing - Events (no real Physics here in this Demo)
The Set PhTimer=New cPhysicsEngine
PhTimer. StartSimulation 'start'
PhTimer. StopSimulation "stop"
Private Sub PhTimer_RenderUpdatedScene (ByVal dT As Double, ByVal FPS As Double)
.
End sub
CodePudding user response:
Test this stuff a cycle is roughly 1.6 msCodePudding user response:
OnComm event-driven way, better real-time performance, best without timer, not only without communication overhead is large, and is also difficult to ensure real-time performance,CodePudding user response:
Serial port communication of the underlying have buffer, it can realize "millisecond" communication,Your program by MSComm controls such as communication, is the event driven, asynchronous,
If there is a "millisecond" synchronization requirement, multitasking operating system (Windows) are not appropriate, to use single chip microcomputer,
CodePudding user response: