system
Given the following post, respond as if you're commenting on Reddit:
human
How long did it take for the dinosaurs to go extinct?

It has been determined that the dinosaurs went extinct due to an asteroid hitting Earth. I feel that many people, myself included, believe that once the asteroid hit, the dinosaurs died almost instantly. Was this actually the case or did it take days, weeks, or even years for the dinosaurs to go extinct after the asteroid hit?
gpt
For a couple million years before the asteroid hit the earth, volcanos had been ejecting large amounts of CO2, and also the lava that created the Deccan Traps in India.  The resulting climate change had resulted in the extinction of many dinosaur species.  

The asteroid strike was a final coup de grace for the non-avian dinosaurs.  The impact was immediately fatal for nearby dinosaurs. A large amount of vaporized rock dust was ejected into the upper atmosphere, which greatly reduced sunlight reaching the earth's surface so that the plants at the bottom of the food chain could not grow.  That lasted long enough to starve off the dinosaurs and all other large animals, as well as a long list of marine species.  In the geological record, the extinctions after the asteroid impact were essentially instantaneous.  Depending on the area, a few individuals of some dinosaur species may have lived for a few more months or years or decades.  

As the dust settled over the following years and sunlight returned to normal, plant seeds and spores germinated which allowed flowering plants to become dominant.  Avian dinosaurs and other small animal species had some survivors, who reproduced and evolved to fill the various ecological niches vacated by the extinct species.

So the answer to your question is that many species of dinosaurs went extinct during the two million years before the asteroid impact.  All of the remaining non-avian dinosaur species went extinct over a few years or decades after the impact.  Avian dinosaurs are still with us, but we call them birds.