You shouldn't use Thread.Sleep
because it blocks the thread for that amount of time so your server is less scalable. You should instead use Task.Delay
which waits asynchronously without blocking a thread:
await Task.Delay(10000)
Task.Delay
uses a Timer
internally to accomplish that. For more info: Thread.Sleep vs Task.Delay?