Code:
function TheTimeInSeconds: Integer;
var
  Hour, Mins, Sec, MSec: Word;
begin
  DecodeTime(Now, Hour, Mins, Sec, MSec);
  Result := Hour * 3600 + Mins * 60 + Sec;
end;
Modified TheTime function. I found this to be more practical