What is the time period in the story The Pit and the Pendulum?

Napoleonic Wars. Round about 1809, during the Spanish invasion.Its time period is Romanticism