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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:21:00+00:00 2026-05-15T03:21:00+00:00

i need a real time clock in ansi c which provide an accuracy upto

  • 0

i need a real time clock in ansi c which provide an accuracy upto miliseconds?

i am working on windows a windows base lib is also acceptable thanx in advance.

  • 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-05-15T03:21:00+00:00Added an answer on May 15, 2026 at 3:21 am

    You can’t do it with portable code prior to C11.

    Starting with C11, you can use timespec_get, which will often (but doesn’t necessarily) provide a resolution of milliseconds or better. Starting from C23, you can call timespec_getres to find out the resolution provided.

    Since you’re using Windows, you need to start out aware that Windows isn’t a real-time system, so nothing you do is really guaranteed to be accurate. That said, you can start with timeBeginPeriod(1); to set the multimedia timer resolution to 1 millisecond. You can then call timeGetTime() to retrieve the current time with 1 ms resolution. When you’re done doing timing, you call timeEndPeriod(1) to set the timer resolution back to the default.

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

Sidebar

Related Questions

I need to write a program to implement real time clock for ARM architecture.
I am implementing a system where I need real-time updates. I have been looking
I need to display a real time data from MS SQL 2005. I saw
I need to do an object recognition in real time (with image coming from
This doesn't need to be a real time solution, but are there some log
I'm building a real time game, mostly chat based, and I need to have
I'm starting a development to support real-time gaming. I need to support collaborative game
I need to get real world date and time in Java. I use: Date
I'm looking to write a Twitter application, and I need to get real time
I'm working on a simple 2D Real time strategy game using XNA. Right now

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.