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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:19:07+00:00 2026-06-10T18:19:07+00:00

Does anybody know x86 instructions that can be used to measure time? Is the

  • 0

Does anybody know x86 instructions that can be used to measure time?
Is the timer that leads to task switches accessible by software?

  • 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-10T18:19:08+00:00Added an answer on June 10, 2026 at 6:19 pm

    Ways to measure time on an x86 platform:

    • Real Time Clock – The source of time and date for your OS. 1 second precision. The only time source in a standard PC that can be used to measure absolute time.

    • 8254 Counter/Timers – A standard counter/timer chip that has been present on motherboards since the dawn of PC (now a functional block inside the chipset). This is the traditional source of IRQ0, the timer interrupt that does task switching in most older OSes.

    • RDTSC assembly instruction – Counts CPU clock cycles. See the answer Anon ymous posted for some usage details. Pretty much the highest level of precision you can find for a time source on x86. However, it has some gotchas with accuracy. Also the most convenient option if you are writing in assembly.

    • RDTSCP assembly instruction – Similar to RDTSC, but is serialized, which resolves some of the accuracy issues with RDTSC. Only found on the newest processors.

    • HPET – Introduced around the Core Duo era of PCs. Intended to be a replacement for the venerable 8254. Modern OSes will use this as their task scheduling interrupt (Vista and later)

    • Proprietary Timers in the Chipset – Some chipsets have special timers built into them for Power Management and Multimedia functions. You can sometimes commandeer these for your own application, assuming you are dealing with a fixed-function embedded system and not a general purpose PC.

    Note that not all of these options will be available to you depending on your OS and Hardware. If you are running under a modern OS (Windows, Linux), it will take control of the 8254/HPET for its own timing needs, and thus they will be unavailable for you.

    Under a modern Operating System, it is usually best to use the OS-provided timing functions. The OS developers have probably worked out a lot of the issues that you will run into on your own if you try to use it. (Note that the OS may provide multiple timing functions. Pick the one that is suitable for your application.)

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

Sidebar

Related Questions

Does anybody know a Perl library that can parse XML documents and enables me
Does anybody know if the CUDA library 'Thrust' can generate random numbers on the
Does anybody know how I can enable line numbers for Ruby (and Ruby on
Does anybody know what dictionary UITextChecker pulls from? I use it to verify that
Does anybody know how to get rid of the annoying tooltips that pop up
Does anybody know the syntax of turning a list of lists into something that
Does anybody know how much memory is used by a numpy ndarray? (with let's
Does anybody know whether this can be achieved in jQuery. Target/addClass to the last
Does anybody know how I can delete the fading effect after dropping or sorting
Does anybody know the values that are given in the table_privileges? I already found

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.