If they are a really old and hostile civ, then they already would have found and destroyed us. Since that is not what we observe, they are either not hostile or are relatively young.
Assume for a moment the worst case - they are hostile and young. Due to observation selection effects, most observers detect either no alien civs or alien civs around their same age.
Say it takes 1000 years to go from early space civ (us today), to megastructure civ (them), and say 100 years from early space to get large space telescopes/sensors sufficient to detect most earth size planets within a few 1,000 lyrs. So they are only about 1000 years ahead of us, but 1480 years away.
They would build interstellar sensors around 1100 AD, at which point they would image us from 380 BC. They'd see a biosphere, but hopefully not yet any evidence for civilization, as that shouldn't really be detectable until the industrial era - about 2200 years later.
To detect earth civ circa 380 BC or earlier they'd probably need images from a probe near the planet or at least near the sun, which implies a minimum of ~3000 year round trip time.
In general, I think one can construct an argument that we should expect to have roughly order ~D time until any contact/invasion, where D is the distance in lyrs between us and the alien civ.
Except that a SETI-type attack such as the one described in Hoyle's A for Andromeda (mentioned in the link provided by turchin above) would not necessarily target us specifically; it could be launched by aliens with no knowledge of our existence.
KIC 8462852, or the WTF (Where's the Flux?) star, is an F-type main sequence star about 1,480 ly away. It's a little larger and more massive than the sun, and a few times brighter. Age is uncertain, but probably older rather than younger.
Kepler observations over the last few years reveal very strange large and aperiodic flux variations (up to 20%) - of the general form predicted by some ETI megastructure models. However there doesn't appear to be any excess infrared.
The star's fluctuations were discovered by the PlanetHunters team. In the WTF paper they review a large number of unlikely natural explanations and settle on an unusual comet swarm as the most likely scenario.
Abstract of the WTF paper:
From "Comets or Aliens?", on the Planet Hunters blog: " However, so far over 100 professional scientists have had a look at the lightcurves and not managed to come up with a working solution."
In a another recent paper Jason Wright et al discusses the WTF star in more detail and critiques the comet theory.
The Search for Extraterrestial Civilizations with Large Energy Supplies. IV: the Signatures and Information Content of Transiting Megastructures:
Jason Wright discusses WTF here on his blog.
Big reddit discussion on r/askscience here.