I developed the code on my Laptop with Win10 and anything was working fine.
When I tested it on the destination machine with WinXP, I was wondering, why the progress-bar was not working right.
After some tests, I find out, that ElapsedMilliseconds() jumps to the past (to lower values) randomly after a few seconds.
To proof this, I wrote a little test-code, which reports, if a new ElapsedMilliseconds()-value is lower than the one before.
Code: Select all
Repeat
ActTimer = ElapsedMilliseconds()
If ActTimer < OldTimer
Debug "ERROR at "+FormatDate("%hh:%ii:%ss", Date())+" - old Timer -> "+Str(OldTimer)+" / "+Str(ActTimer)+" <- new Timer ("+Str(ActTimer-OldTimer)+"ms)"
EndIf
OldTimer = ActTimer
Delay(100)
Until 0
Code: Select all
ERROR at 12:38:49 - old Timer -> 1153164 / 1148576 <- new Timer (-4588ms)
ERROR at 12:38:58 - old Timer -> 1162498 / 1157910 <- new Timer (-4588ms)
ERROR at 12:39:07 - old Timer -> 1190624 / 1186036 <- new Timer (-4588ms)
ERROR at 12:39:17 - old Timer -> 1199980 / 1195392 <- new Timer (-4588ms)
ERROR at 12:39:22 - old Timer -> 1200026 / 1186064 <- new Timer (-13962ms)
ERROR at 12:39:26 - old Timer -> 1190658 / 1186071 <- new Timer (-4587ms)
ERROR at 12:39:36 - old Timer -> 1199966 / 1195399 <- new Timer (-4567ms)
ERROR at 12:39:40 - old Timer -> 1199998 / 178184 <- new Timer (-1021814ms)
ERROR at 12:39:50 - old Timer -> 187446 / 178191 <- new Timer (-9255ms)
ERROR at 12:39:59 - old Timer -> 187449 / 178173 <- new Timer (-9276ms)
ERROR at 12:40:08 - old Timer -> 187446 / 178170 <- new Timer (-9276ms)
ERROR at 12:40:27 - old Timer -> 224927 / 215652 <- new Timer (-9275ms)
ERROR at 12:40:37 - old Timer -> 224987 / 215712 <- new Timer (-9275ms)
ERROR at 12:40:46 - old Timer -> 224965 / 215690 <- new Timer (-9275ms)
ERROR at 12:41:05 - old Timer -> 262405 / 253160 <- new Timer (-9245ms)
Sometimes it falls back only a few seconds, sometimes more than 17 Minuten (1199998 > 178184).
The only consistency I can see is, that the 'fallback-time' is ~4.6 Seconds or a multiplication of it.
Anyone an idea why or how this could happen?
Maybe some of you could run the test-code and give me some feedback if this phenomenon appears on your machine as well.
Attention: Because it's an endless routine, you need to break it manually.
I've testet it with PB 5.5 on several WinXP-PCs, and run into this problems on all of them.
All PCs do have the same configuration: WinXP-Pro SP3, an older AMD Geode single-core Processor and 512MB Ram.