How long did it take for the titanic to hit the iceberg after it was spotted?

When the Titanic hit the iceberg it had almost no time to respond.