I want to create a method that takes two variables timeIn and timeOut and compare the times between the two to draw a difference.
How can I make it so that that timeIn is recorded at time now, and timeOut would also be a time for the present date?
It is as if I checked into a parking lot, and then check out sort thing.
Could I take timeOut and subtract it from timeIn to get the difference?
I am using c# code.
try this :
edit
DONT USE TIMESPAN
ticks represented in
Stopwatchare based on a combination of the hardware of the machine and the operating system.Contrast this to
TimeSpanwhereTicksare defined as100 nanosecond intervals— which is obviously machine/OS independent.