P pdabasic Active Member Licensed User Sep 25, 2011 #1 I wrote i little code for testing timer tick event. I added two timer. First interval=1 Second interval=1000 First timer increases a variable, second writes the variable curent value to a label. If my calculet is ok, every second the label text must to increase with 1000 but it doesn't look like this.... Why? Attachments timer.sbp timer.sbp 635 bytes · Views: 418
I wrote i little code for testing timer tick event. I added two timer. First interval=1 Second interval=1000 First timer increases a variable, second writes the variable curent value to a label. If my calculet is ok, every second the label text must to increase with 1000 but it doesn't look like this.... Why?
taximania Well-Known Member Licensed User Longtime User Sep 25, 2011 #2 I think it's virtually impossible to update the label at 1/1000th a sec. The code below isn't far out, using a timer tick of 100 Test done on my laptop, 1.73Ghz processor. Code: Copy Sub Globals txt=0 'Declare the global variables here. End Sub Sub App_Start Form1.Show Timer1.Enabled=True End Sub Sub Timer1_Tick txt=txt+100 lbl0.text=txt End Sub
I think it's virtually impossible to update the label at 1/1000th a sec. The code below isn't far out, using a timer tick of 100 Test done on my laptop, 1.73Ghz processor. Code: Copy Sub Globals txt=0 'Declare the global variables here. End Sub Sub App_Start Form1.Show Timer1.Enabled=True End Sub Sub Timer1_Tick txt=txt+100 lbl0.text=txt End Sub
taximania Well-Known Member Licensed User Longtime User Sep 25, 2011 #3 Try this for test results. Run the .exe on your desktop/laptop. Enter a T1 of 1. Hit go. there's a 3 sec delay, then T2 starts set at 1000 and T1 starts. My result is 64. That's 64 out of a 1000 ticks. Try different T1 values. Attachments testTimer.zip testTimer.zip 14.9 KB · Views: 411 Last edited: Sep 25, 2011
Try this for test results. Run the .exe on your desktop/laptop. Enter a T1 of 1. Hit go. there's a 3 sec delay, then T2 starts set at 1000 and T1 starts. My result is 64. That's 64 out of a 1000 ticks. Try different T1 values.
taximania Well-Known Member Licensed User Longtime User Sep 25, 2011 #4 Just run a compile for device. Copied and run the program on my XDA. Guess what :sign0060: 430 with a setting of T1. Just shows the speed of BasicBppc compiled on the device, even on my old phone. Gobsmacked is not the word. Comment's please :sign0142:
Just run a compile for device. Copied and run the program on my XDA. Guess what :sign0060: 430 with a setting of T1. Just shows the speed of BasicBppc compiled on the device, even on my old phone. Gobsmacked is not the word. Comment's please :sign0142:
P pdabasic Active Member Licensed User Sep 26, 2011 #5 taximania said: I think it's virtually impossible to update the label at 1/1000th a sec. The code below isn't far out, using a timer tick of 100 Test done on my laptop, 1.73Ghz processor. Click to expand... Thats why I change the label text only once/sec. For me it's mean the timer can change 60-100 times/sec a varriable value!? It's right?
taximania said: I think it's virtually impossible to update the label at 1/1000th a sec. The code below isn't far out, using a timer tick of 100 Test done on my laptop, 1.73Ghz processor. Click to expand... Thats why I change the label text only once/sec. For me it's mean the timer can change 60-100 times/sec a varriable value!? It's right?