I'm looking for a science based answer based on current technology. Given that we do commit some small amount of resources and time to searching for stellar objects, with our current technology, how long before impact would we probably detect an asteroid large enough to (possibly) lead to a mass extinction event?
We do have some effort currently spent on tracking things which could impact earth, but I know we have far from complete coverage. A network of various astronomy departments, amateur astronomers, and agencies like NASA do share information, which does increase our chances of spotting things, but our coverage of even the known objects in our solar system is patchy. We have a hard time even keeping track of all the random junk our space programs have deposited in low earth orbit.
Given all this, but also given the fact that an asteroid capable of conceivably wiping out the human race (or at least a sizable majority of our population would have to be pretty large, pretty dense, and traveling at a pretty high relative velocity, how long before impact would modern society probably detect it?
The size of the rock is big enough to blast a pretty significant crater in the earth, probably reshaping a continent in the process and creating a new inland sea (unless it hits the Pacific or something). It is large enough to throw up enough debris to effect people all over the earth (possibly with nuclear winter effects, etc).
Edit: the Chicxulub crater was probably caused by an asteroid 10-15 km in diameter. This impact does not need to be as powerful as that one, but that might provide a rule of thumb for what constitutes an "extinction event" sized asteroid strike.