Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:23:21+00:00 2026-06-12T01:23:21+00:00

Thread.Sleep doesn’t seem to be supported in .NET for Windows Store apps. For example,

  • 0

Thread.Sleep doesn’t seem to be supported in .NET for Windows Store apps.

For example, this

System.Threading.Thread.Sleep(1000);

will compile when targeting any .NET Framework (2.0, 3.5, 4.0, 4.5), but not when targeting .NET for Windows Store apps (or in a portable class library which targets both 4.5 and store).

System.Threading.Thread is still there, it just doesn’t have the Sleep method.

I need to delay something for a few seconds in my app, is there a suitable replacement?

EDIT why the delay is needed: My app is a game and the delay is to make it look like the computer opponent is “thinking” about his next move. The method is already called asynchronously (main thread isn’t blocked), I just want to slow the response time down.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:23:22+00:00Added an answer on June 12, 2026 at 1:23 am

    Windows Store apps embrace asynchrony – and an “asynchronous pause” is provided by Task.Delay. So within an asynchronous method, you’d write:

    await Task.Delay(TimeSpan.FromSeconds(30));
    

    … or whatever delay you want. The asynchronous method will continue 30 seconds later, but the thread will not be blocked, just as for all await expressions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following function System.Threading.Thread.Sleep(); delay the thread in millisecond, and take the integer value
I am running a windows service and using a loop and Thread.Sleep to repeat
I want to interrupt a thread, but invoking interrupt() doesn't seem to work. Below
It doesn't seem to do squat for the following test program. Is this because
From time to time I get a System.Threading.ThreadStateException when attempting to restart a thread.
When does Java's Thread.sleep throw InterruptedException ? Is it safe to ignore it? I
Does anyone know a Library which provides a Thread.sleep() for Java which has an
sleep() is a static method of class Thread. How does it work when called
I am having an odd error with Thread.sleep() on Java. For some reason, when
Anybody know ,what is the logic behind Thread.sleep in java? . Are they using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.