interval is negative where it should be positive

hairyyak

New member
Joined
Dec 12, 2021
Messages
2
Programming Experience
10+
You can download a free version of Visual Studio 2019 from this Visual Studio Older Downloads - 2019, 2017, 2015 & Previous Versions You need an account with Microsoft in order to download this software.

I installed all the different features of this software which is an overboard approach but works. The problem I'm having with this computer program which I wrote is that the interval is negative where it should be positive and constantly update.

Thanks for any help.
 

Attachments

  • Example1-1.zip
    41.2 KB · Views: 17
Please post the relevant code as text in code tags. Not as a screenshot. Not as .ZIP file that includes everything including the kitchen sink like you did above.

Also tell us what you have tried to attempt to identify and fix the problem.
 
Anyway to answer your question, you never initialize endTime to a value so it is effectively DateTime.Zero. Zero minus some positive number will always be negative.
 
Last edited:
Back
Top Bottom