A strange behavior of a Boolean variable

mencoxx

New member
Local time
Yesterday, 21:31
Joined
Nov 18, 2008
Messages
7
Ciao,

I run a device monitoring program and noticed that at the turn of midnight, the program would stop, debugging I noticed that the variable 'flag' would change state on its own.

I solved it, I know I had to use the API Sleep function, but still it's really weird.

I attach a test example.

Thanks a lot.
Domenico
 

Attachments

Thank you for your example I haven't had a look at it myself but I know there are a few members here who like a challenge and hopefully someone will have a look and see if they can offer some insight into what's affecting the flag.
 
Thank you for your interest.
If the Timer function after midnight resets, then the delay is zero but I don't think it affects the variable 'flag'.

Ciao
 

Users who are viewing this thread

Back
Top Bottom