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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:02:04+00:00 2026-06-13T12:02:04+00:00

How does a C# Timer Object decide when an elapsed amount of time has

  • 0

How does a C# Timer Object decide when an elapsed amount of time has occurred?

I am wondering if it simply loops or is more intelligent than this.

Also, it would be good to know where to find the C# Source Code to have a look through.

  • 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-13T12:02:05+00:00Added an answer on June 13, 2026 at 12:02 pm

    The .NET BCL has at least two classes providing timers:

    • System.Threading.Timer
    • System.Timers.Timer

    However, the second class is implemented using the first. The first class uses some kind of native Win32 timer and Hans Passant has provided more information about the mechanism used. In the BCL source code the timer is implemented using an internal class named TimerQueue. The implementation of the TimerQueue class has this comment:

    TimerQueue maintains a list of active timers in this AppDomain. We use a single native timer, supplied by the VM, to schedule all managed timers in the AppDomain.

    So basically the AppDomain has a single time source implemented using unmanaged code. See Hans Passant’s answer for more information on that.


    Also, it would be good to know where to find the C# Source Code to have a look through.

    I use JetBrains dotPeek. It can be configured to retrieve source files from Microsoft if they exist. Simply load in the version of .NET you want to examine, hit Ctrl+T, type “Timer”, select the specific class you want and it will download the source if it exists. Otherwise you will see a decompiled version (depending on your configuration).

    Note that this tool will only allow you to decomple managed code and to fully understand the implementation of timers in .NET you need to be able to peek further into unmanaged code.

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

Sidebar

Related Questions

Does C++ has some built in timer class with same idea as .NET System.Threading.Timer
When a timer's autostart is set to true, does it execute the elapsed event
Can't find the answer to my question in MSND: Does Timer class guarantees that
I'm developing an app that starts a System.Threading.Timer which does some fairly rapid reading/writing
does any one know of any good countdown timer's for flash which i can
I have a Timer which kicks off and does it's job indefinitely in it's
Why does every time I do mvn jetty:run, maven tries to download some dependencies
The following code does not time out in Ruby 1.9.3p194 (2012-04-20) [i386-mingw32]: require 'timeout'
I'd like a response from someone who actually does real-time programming in C# or
I've always been curious, why does the time(time_t *) function both return a time_t

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.