![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I want a very simple timer to clock the speed in several subs in order to tune up the speed of the application. Is this enough? Sub Globals N = 10 STOP = FALSE End Sub Sub App_Start Form1.Show Timer1.Interval = 1 'minimum milliseconds Timer1.Enabled = True End Sub Sub Something STOP = FALSE Do the thing..... STOP = FALSE End Sub Sub Timer1_Tick N = N+1 If STOP = FALSE Then Timer1.Enabled = False lblTime.Text = N End Sub thnx Marc Last edited by Stellaferox : 02-26-2008 at 08:29 PM. |
|
||||
|
This will not work as the timer tick events will not fire while other code is running (unless you add the DoEvents keyword).
Just checking the value of Now will also not be enough because it is updated each second on the device. The solution is to use GetTickCount from this library: Useful Library Calculate its value in the beginning and end of each sub. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Timer component | 2220 | Questions & Help Needed | 4 | 09-27-2008 08:41 PM |
| Simple Chess Clock | erzee | Share Your Creations | 1 | 07-25-2008 02:46 AM |
| Passing arrays to Subs. | jesb4ppc | Questions & Help Needed | 6 | 04-15-2008 06:03 PM |
| Redundant SUBs | badkarma | Basic4ppc Wishlist | 0 | 04-10-2008 08:50 PM |
| Icon near the clock | vitramir | Questions & Help Needed | 7 | 12-13-2007 04:14 PM |