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 8258133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:26:00+00:00 2026-06-08T02:26:00+00:00

This question mostly for education. I just interested why. I’m using program from here

  • 0

This question mostly for education. I just interested why. I’m using program from here but modified it a little bit:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            long ticks = DateTime.Now.Ticks;
            while(true)
            {
                if (ticks != DateTime.Now.Ticks)
                {
                    long newTicks = DateTime.Now.Ticks;
                    Console.WriteLine(newTicks - ticks);
                    ticks = newTicks;
                }
                else
                {
                    Console.WriteLine("same");
                }
            }
        }
    }
}

Results:

600$ Lenovo Edge 11, Intel Pentium U5400, Windows 7 Home Basic

same
same
same
same
same
same
same
10000
same
same

10000$ HP DL360p Gen8 2 * Xeon E5-2640, Windows Server 2008 R2

same
same
same
same
same
same
same
156001
same
same
same
same
same
same
same
same
same
same
same
same

So the precision of the DateTime on the cheap notebook is 10 ms, expensive server hardware has precision of 156 ms.

Why? I guess probably Windows 7 is more “precise” than Windows Server 2008 R2, but this is just my guess. On both computers latest .NET framework with all updated and all windows updates are installed.

  • 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-08T02:26:02+00:00Added an answer on June 8, 2026 at 2:26 am

    First of all, you miscalculated:

    The smallest unit of time is the tick, which is equal to 100 nanoseconds.

    So 10000 ticks are just 1ms, and 156001 ticks are 15.6ms.


    That difference is not in the hardware. By default windows runs a certain internal timer approximately every 16ms. This timer is responsible for many timing related features in windows, including Timers, Environment.TickCount, Thread.Sleep and DateTime.UtcNow.

    Any application can reduce this to a chosen number of milliseconds (i.e. 1ms minimum) using the timeBeginPeriod API. It seems like an application running on your notebook has requested higher precision, but no application running on your server has.

    It’s not active by default, because it has some negative side-effects. For example higher power consumption when the computer is idling, because it can only sleep for 1ms intervals instead of 16ms intervals.

    This function affects a global Windows setting. Windows uses the lowest value (that is, highest resolution) requested by any process. Setting a higher resolution can improve the accuracy of time-out intervals in wait functions. However, it can also reduce overall system performance, because the thread scheduler switches tasks more often. High resolutions can also prevent the CPU power management system from entering power-saving modes. Setting a higher resolution does not improve the accuracy of the high-resolution performance counter.

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

Sidebar

Related Questions

I mostly develop using C#, but I think this question might be suitable for
This question is mostly just out of academic interest. I started using YUI 3
Say I have two tables (I am using Django, but this question is mostly
This is mostly just out of curiosity, and is potentially a silly question. :)
This question is related to another question I wrote: Trouble using DOTNET from PHP.
This is mostly a follow-up to this question . I decided to just keep
This question is a bit vague, and I apologzie for that, but a fairly
This question has been asked/answered (mostly) before, BUT I've tried three things to stop
I'm familiar with yield to return a value thanks mostly to this question but
This question is mostly curiosity than anything else. But I currently place all my

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.