Hi all,
I'm trying to compare 2 DateTimes in C# to see if a specific time difference (5 seconds) has elapsed. I've been told that the best/most efficient way to compare them is to use a TimeSpan object in the code because it takes into account timing over midnight/new year/etc. However, I cannot see how to go about this.
Any help would be much appreciated.
I'm trying to compare 2 DateTimes in C# to see if a specific time difference (5 seconds) has elapsed. I've been told that the best/most efficient way to compare them is to use a TimeSpan object in the code because it takes into account timing over midnight/new year/etc. However, I cannot see how to go about this.
Any help would be much appreciated.