I want to compare between a certain time and the current time to check if it has exceeded a given period.
I think i should be using TimeSpan but i am not sure how. The two dates im comparing are DateTime objects.
TimeSpan ts = TimeSpan.FromSeconds(_timeInterval);
if(DateTime.UtcNow.Ticks - rex.LastFired.Ticks > ts.Ticks)
// bla bla
Just compare the difference between your dates with a timespan.
Why not use the DateTime.Compare ?
http://msdn.microsoft.com/en-us/library/system.datetime.compare.aspx
EDIT: you ll first have to use TimeSpan.Substract or DateTime.Substract, then you can use the appropiate .Compare method.