Home > Back-end >  BCB timer running for a period of time no longer run, don't know what's the problem
BCB timer running for a period of time no longer run, don't know what's the problem

Time:09-28

Start a timer to FTP upload a file, start no problem, after a period of time no longer perform timing task, do in a thread at the beginning, then open a thread to upload task alone, or run fly, hope could help solve! We should be grateful,,,

CodePudding user response:

Don't set a time when setting time==time to upload, in time to upload, time> CodePudding user response:

Thank you very much for your reply, the working principle of the timer is set a time, then the time countdown to trigger timing task, not by time==time upload ah,,

CodePudding user response:

Possible mistakes in the process of the task to crash the process, recommended the try (catch {} {} to crawl errors

CodePudding user response:

Thank you for your answer, but I have try and catch in the program, so this may be little!

CodePudding user response:

The timer is best not to make together with thread, easy to chaos,
Threads need time is gettickcount became,

CodePudding user response:

Program created, setting up a BOOL, such as BOOL BTime=false;
Then, the clock arrived after the BTime=true, performed BTime=false;
So we can solve without finish upload is executed a

Upload automatically stop, however, may also be a server side closed your upload, this problem, is to determine your problem or the problem of server
For example you can open an FTP program at the same time with your application, upload at the same time, see the FTP program, will also automatically interrupts
  • Related