IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

High Resolution Time Stamp Facility

A library of functions that can be used to measure activities of less than one second's duration using highly accurate time stamps that can be converted to dates and times of day.


Date Posted: April 19, 2002
OverviewRequirements Download FAQs Forum Reviews

Update: April 25, 2002

Now matches developerWorks article: getEpochMicroseconds returns a "long" (rather than a "Long"). Two new methods added to the ibmts.jar's ibmtslink.java: getEpochMicrosecondsAsLong, which returns a "Long", and getCopyright().

What is IBM High Resolution Time Stamp Facility?

IBM High Resolution Time Stamp Facility (IBMTS) is a library of functions that can be used to measure activities of less than one second's duration using highly accurate time stamps that can be converted to dates and times of day.

Time stamps describe the occurrence of an event at a point in time. When time stamps share a common timing source, they can be used to measure durations of activities. Higher time stamp resolutions permit more accurate measurement of activity durations. IBM High Resolution Time Stamp Facility was used to measure the durations of activities related to Web page response times.

The resolution or accuracy required of time stamps depends on the consumer's needs. If measuring Web site traffic and counting content requests per hour, then capturing the time of each request to the second is plenty of accuracy. However, when trying to use these same time stamps to measure how long it takes the Web server to respond to these requests, anything taking less than one second would be reported as having zero duration. Today's computers with multi-gigahertz CPUs, fast busses and memory, and content caches are certainly capable of subsecond service times.

How does it work?

IBM High Resolution Time Stamp Facility maintains a time base and measures elapsed durations to generate new time stamps. When the duration is sufficiently large enough, the base is shifted forward to avoid a wrap condition. By creating the original base using the time-of-day clock and using performance counters both to measure the elapsed durations and to adjust the original base value, our time stamp source is isolated from users or programs (for example, Time Services) that might alter the time-of-day clock. Other systems in which time stamps need to be convertible to calendar dates and times are typically tied to the time-of-day clock and are therefore susceptible to changes to the time-of-day clock. This can result in time stamps' going backward or jumping ahead for no apparent reason.

The downloadable file (ibmtsinst.exe) includes an installer, an optional service, and the software developer kit. These allow C/C++, and Java applications to make calls in order to receive high resolution time stamps returned as two values:

  • seconds since the midnight 1/1/70 CUT epoch
  • microseconds.
The former is convertible to calendar date and time using the standard time/Date APIs. The latter is the remaining fraction of seconds when the call for the time stamp was made. A detailed discussion of the APIs is available in an article on developerWorks.

About the technology author(s):
W. Nathanial Mills III works at the Research Division of IBM's Thomas J. Watson Research Center. Mr. Mills joined IBM Research in 1996 after running a successful consulting and software development business for 10 years. His initial work in systems management lead to the development of WebSphere Studio AE Page Detailer, a tool for measuring and displaying download performance of Web pages. He is now a senior technical staff member working with ABLE on various projects involving automated problem diagnosis and systems management. These projects focus on "after sales" product support or are related to WebSphere's and Tivoli's product families. In particular, Mr. Mills helps build ABLE-based applications for use as embedded "rules engines" that help analyze and mine data, make real-time assessments of various application states to drive problem diagnosis, and recommend corrective action. Mr. Mills graduated from Trinity College, Hartford, CT, in 1979. He can be reached here.

Download now Download now

Related technologies

For platform(s):
Win32

For topics:
performance, monitoring


Related resources

Press Articles

 

    About IBM Privacy Contact