**************************************************************
* ports_clocktimer: PORTS Version 1.8 Clock and Timer Module *
**************************************************************

This is the sample implementation of teh PORTS clock and timer
package (CLOCKTIMER).  The purpose of the specification is to
provide a standardized interface to the various clocks on a wide
variety of architectures for ANSI C and C++ programs.

The implementation relies heavily on the C preprocessor macro
features to make it as efficient as possible and to keep overhead low.
This implementation guarantees that WallClock will be available
for each machine, and therefore has a specially named interface.
No other clocks are standarized, and their availability will be
machine dependant.

For a more detailed description of the types and functions of
the clock and timer package see the file "ports_clocktimer.h".
For information on how to use them have a look at the file
"timertest.c".

This version has sample implementations for

  machine type     clock #       clock used           tested with
  ------------     -------       ----------           -----------

  Generic Unix     0             gettimeofday()       Solaris cc, gcc, CC
                                                      SunOS gcc
                                                      AIX cc, xlC
                                                      SGI cc, DCC

  Solaris          0             gethrtime()          cc, CC
                   1             gettimeofday()

  Intel Paragon    0             dclock()             g++, cc

  Cray YMP + T3D   0             rtclock()            cc, CC  (**)

(**) The "new" C + C++ Cray Compilers from the Programming Environment 2.0
unfortunately have a buggy C Preprocessor cpp, which cannot compile
this package correctly. You have to use "CC -h cfront" on this systems.

Later versions of the PORTS clock and timer package will support more
architectures and more clocks.


Installation / Usage
--------------------

1) Select the right flags for your system in the file "Makefile"

2) Type "make test". This compiles the package and runs a simple
   test.

3) To use the package together with your code, include "ports_clocktimer.h"
   in every C or C++ source file which uses the timerws or clocks.
   Then link against ports_clocktimer.o


TODO
----

* use GNU autoconfigure for easy and automatic installation

* integrate with PORTS thread package

* implement for more architectures / clocks



Bernd Mohr
b.mohr@kfa-juelich.de
May 1996
