• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 857
  • Last Modified:

Solaris 8 - Clock granularity


What is the granularity of the clock in Solaris 2.8?  How small of an increment in millisecs can I specify for sleep times on tasks etc...


urls with this info would be appreciated
  • 2
1 Solution
You can specify microseconds (via setitimer(), for example).  But the clock is somewhere between a milisecond and 1/60 seconds depending on the model machine it's running on.

And even if you had microseconds granularity on the timer, it wouldn't matter because Solaris doesn't support hard real-time processes, which means your process just goes back into the "ready to run" queue when the timer pops.  There's no guarantee it will actually start executing at that time.

In practice, you should be able to get resolution to within a hundred miliseconds under most circumstances.
knel1234Author Commented:

Its 2.8(64-bit) running on a 3500.  I am assuming no change to your answer but I just wanted to clear up the "depending on the model machine it's running on" point.

Yeah, but the Sun manuals just say things like "timer resolution is dependant on hardware" but don't point to where to find the resolution for your hardware...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now