Spoiler: we will never invent time machines :( if we had then we would have all ready gone back into our present and told us about it :(
Except if:
Laws are put into place to prevent travelling before a certain time.
Nearly nobody knows about it.
Time machines can only advance forwards in time.
…and probably a lot more.