1
1

run dos2unix on wtime.c and make MPI_Wtime work as it did before.

This commit was SVN r11482.
Этот коммит содержится в:
Gleb Natapov 2006-08-29 10:11:48 +00:00
родитель e479951b3b
Коммит 338134b535

Просмотреть файл

@ -42,20 +42,20 @@ static const char FUNC_NAME[] = "MPI_Wtime";
double MPI_Wtime(void)
{
double wtime;
#if OPAL_TIMER_USEC_NATIVE
wtime = (double)opal_timer_base_get_usec();
#else
#if defined(__WINDOWS__)
wtime = ((double)opal_timer_base_get_cycles()) / ((double)opal_timer_base_get_freq());
return wtime;
#else
#if OPAL_TIMER_USEC_NATIVE
wtime = (double)opal_timer_base_get_usec() / 1000000.0;
#else
#if defined(__WINDOWS__)
wtime = ((double)opal_timer_base_get_cycles()) / ((double)opal_timer_base_get_freq());
return wtime;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
wtime = tv.tv_sec;
wtime += (double)tv.tv_usec;
wtime += (double)tv.tv_usec / 1000000.0;
#endif /* defined(__WINDOWS__) */
#endif /* OPAL_TIMER_USEC_NATIVE */
return wtime / 1000000.0;
#endif /* OPAL_TIMER_USEC_NATIVE */
return wtime;
}