A strange behavior of a Boolean variable

mencoxx

New member
Local time
Today, 06:00
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 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