by Roger Gilchrist (50 Submissions)
Category: Coding Standards
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)
Optimisation is not always about speed. The no-API Pause routine many people use is an example of this. Obviously a Pause should not be longer than you ask for so the more accurately the routine can detect the pause is complete the better it is. The routine gains accuracy because it spends less time working and more detecting. This is a very minor optimisation but the approach will help you in other optimisation work.
------------------------------------------------
See the PauseTutorial.txt file in the zip for more detailed explanations and check out the comments in the demo code for Command4_Click and Sub PauseLong for an interesting possibility for over optimising.
Download Optimising (Pause) (6 KB)