5

Sorry for putting up too simple of a question but I wanted to know what It meant by timer resolution in microseconds and resolution in nanoseconds?

On what Basis this resolution is chosen ?

Is it depends on the timer interrupt frequecy or CPU clock speed?

Also, is it system time is drived from CPU cyclic counter register, if so then how?

1
  • Typically when dealing with a counter (timers are counters) we need to know what we are counting. In the case of a timer this is often referred to as "resolution".
    – Tyson
    Sep 8, 2015 at 15:39

2 Answers 2

4

what it means by timer resolution in microseconds and resolution in nanoseconds?

Let me answer that with a regular digital clock anology. Suppose the clock shows this 17:13. Does this means that it is 1700 hours (or 5PM for some people) and 13 minutes?

The answer is no. I only showed a clock with a resolution on minutes. The actual times might be 17:13 and 59 seconds. However my answer will always be rounded to full minutes.

If I add seconds to the clock then the resolution will increase 60 fold.

Now back to computers, where we have the same thing. Just not in minutes but in microseconds...

Also, is it system time is drived from CPU cyclic counter register, if so then how?

A modern computer has many time sources. Some on the CPU die, some elsewhere. Typically these have different resolutions and different abilities (e.g. fire once, fire every X seconds, ...). Some of them stop when a CPU is suspended (e.g. in C states), some do not.

As to 'system time'.. I am not sure what you mean by that.

2
  • Thanks @Henners for your answer, From system time I mean current time of the system . I have access to cyclic counter register of time block of the particular core and I need to driver current time of the system from this register, how?
    – AMIT
    Sep 9, 2015 at 13:39
  • If you mean the time mentioned by windows in the taskbar... no idea. For other operating systems it will vary, both by OS (kernel time calls?), by timers used (configurable at boot and not always the same between releases) and possibly even depending on the GUI.
    – Hennes
    Sep 13, 2015 at 11:31
3

Timer resolution is the smallest unit of time that can be accurately measured by that timer. Timer resolution for the CPU (which is the RTC or Real Time Clock resolution) differs from that of the API made available to the programmer by the operating system. Check this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .