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

  • SEARCH
  • Home
  • 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 8715255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:48:11+00:00 2026-06-13T05:48:11+00:00

When using Threading.Thread.Sleep in .NET, there is an option to use Threading.Thread.Sleep(timeout As TimeSpan).

  • 0

When using Threading.Thread.Sleep in .NET, there is an option to use Threading.Thread.Sleep(timeout As TimeSpan).
Now, in System.TimeSpan there is the option to express period in 100-nanosecond units: System.TimeSpan(ticks as long).
Can Threading.Thread.Sleep work with nanoseconds or it converts them to milliseconds (integer)?
If it converts them to milliseconds I quess there is no way to suspend a thread for less than 1 millisecond. Is that right?

  • 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-13T05:48:12+00:00Added an answer on June 13, 2026 at 5:48 am

    That falls in the “it depends” category. You could, say, be using it in a Silverlight app that runs on a Mac. But a standard Windows desktop app uses the operating system’s Sleep() call which accepts a sleep time expressed only in milliseconds.

    That’s not where it ends, by default Windows can only sleep a thread with an accuracy that depends on the operating system clock interrupt. Which is, by default, 1/64 of a second, 0.015625 seconds on most machines. So if you Thread.Sleep(1) then you’ll actually sleep for about 16 milliseconds. Or more.

    You can jack up the interrupt rate by pinvoking timeBeginPeriod(1). Sleeps are now accurate to a millisecond, plus or minus a bunch due to scheduling inaccuracies. Something you should never do on a battery-powered machine. And don’t forget to pinvoke timeEndPeriod().

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

Sidebar

Related Questions

So is the following equivalent in memory usage? System.Threading.Thread.Sleep(500); vs using System.Threading; ... Thread.Sleep(500);
I'm trying to create a new System.Threading.Thread object using Jscript, but I can't get
When using System.Threading.Timer, and initializing a windows form on the timer's tick event, the
I am using System.Threading.ThreadPool.QueueUserWorkItem(x => MyMethod(param1, param2, param3, param4, param5)); I want to call
using System; using System.Drawing; using System.IO; using System.Security.Cryptography; using System.Text.RegularExpressions; using System.Windows.Forms; using System.Threading;
The Code using System; using System.Threading; public delegate void LoadingProgressCallback(double PercentComplete,string ItemName); public delegate
I am currently trying to achieve thread synchronization in C++ .net using only atomic
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.IO; using System.Net; using System.Net.Mail;
I faced a problem while using threading for the first time, In an SWT
I'm developing an app using threading, and something weird is happening. I have these

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.