gettimeofday(): Help please : SOURCES

Ralf Corsepius corsepiu at
Fri Mar 5 16:14:35 UTC 2004

On Fri, 2004-03-05 at 14:04, sashti srinivasan wrote:
> Hello,
>    I approached the list with following problems:
> (1) "raw handler connexion failed" in pc386.(found to
> be because of usage of functions Timer_initialize(),
> Read_timer())
> (2) gettimeofday() returning constant value.
>    Please help me in getting them solved.  The
> relevant source code is as below.
>   My main file is this.  This is intented to be used
> in both linux and rtems.  I think, I have more problem
> in the next file I used for time measurements.  Help
> me in getting the problems solved.
> -------------------------------------------------------------
> /* Posix performance measurement suite
>  * S Srinivasan CS02M040, iitm
>  */
> #include <stdio.h>
> #define FOR_RTEMS

Just a stylistic comment:
All RTEMS toolchains internally define __rtems__.

Therefore, you can safely rely on "#ifdef __rtems__" to distinguish
between RTEMS specific and non-rtems specific code inside of application


More information about the users mailing list