Could you please help me?
I'm beginner in AIX (currently we are porting some software to AIX from
Tandem and WinNT).
We are using C/C++.
I need high resolution timer on AIX platform (resolution 1 microsecond or
better).
Is it exists?
What it is on other platforms:
* Tandem: functions JULIANTIMESTAMP(), MYPROCESSTIME();
* the same emulated on WinNT via WinAPI functions:
QueryPerformanceFrequency(), QueryPerformanceCounter().
Btw, what you can recommend to read about programming for AIX ?
I mean - something about AIX-specific functions, etc.
WBR,
Dmitry.
ps. please dusplicate answer to dima...@ukr.net
struct timeval stv;
struct timezone stz;
gettimeofday( &stv, &stz );
// stv.tv_sec seconds
// stv.tv_usec microseconds
inspecting my source codes their could be another one:
struct timestruc_t stv;
gettimer( TIMEOFDAY, &stv );
// stv.tv_nsec seems to hold nanoseconds
>Could you please help me?
>I'm beginner in AIX (currently we are porting some software to AIX from
>Tandem and WinNT).
>We are using C/C++.
>I need high resolution timer on AIX platform (resolution 1 microsecond or
>better).
>Is it exists?
Go to
http://publib16.boulder.ibm.com/cgi-bin/ds_rslt?lang=en_US
and search for "timer". Perhaps gettimerid & friends are what you want.
--
Dale Talcott, IT Research Computing Services, Purdue University
a...@quest.cc.purdue.edu http://quest.cc.purdue.edu/~aeh/
Have you looked at read_real_time() ??
-part of the Standard C Library (libc.a)
-uses processor real time clock
-nanosecond resolution
read the AIX man page for details, or view here:
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf2/read_real_time.htm
good tutorial overview on performance tools, (including timing) on AIX machines at LLNL:
http://www.llnl.gov/computing/tutorials/workshops/workshop/performance_tools/MAIN.html
and Nat Mills article "When microseconds matter" at developerWorks has some nice implementation
details (for Win32 APIs) here..
http://www-106.ibm.com/developerworks/library/i-seconds/
..using the alphaWorks High Resolution Time Stamp Facility:
http://www.alphaworks.ibm.com/tech/ibmts
ps. Thanks to all guzs answered me too...
"Eric.Jones" <Eric....@hispeed.ch> wrote in message
news:cl6jam$b4r$1...@newshispeed.ch...