run dos2unix on wtime.c and make MPI_Wtime work as it did before.
This commit was SVN r11482.
Этот коммит содержится в:
родитель
e479951b3b
Коммит
338134b535
@ -42,20 +42,20 @@ static const char FUNC_NAME[] = "MPI_Wtime";
|
|||||||
double MPI_Wtime(void)
|
double MPI_Wtime(void)
|
||||||
{
|
{
|
||||||
double wtime;
|
double wtime;
|
||||||
#if OPAL_TIMER_USEC_NATIVE
|
#if OPAL_TIMER_USEC_NATIVE
|
||||||
wtime = (double)opal_timer_base_get_usec();
|
wtime = (double)opal_timer_base_get_usec() / 1000000.0;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
wtime = ((double)opal_timer_base_get_cycles()) / ((double)opal_timer_base_get_freq());
|
wtime = ((double)opal_timer_base_get_cycles()) / ((double)opal_timer_base_get_freq());
|
||||||
return wtime;
|
return wtime;
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
wtime = tv.tv_sec;
|
wtime = tv.tv_sec;
|
||||||
wtime += (double)tv.tv_usec;
|
wtime += (double)tv.tv_usec / 1000000.0;
|
||||||
#endif /* defined(__WINDOWS__) */
|
#endif /* defined(__WINDOWS__) */
|
||||||
|
|
||||||
#endif /* OPAL_TIMER_USEC_NATIVE */
|
#endif /* OPAL_TIMER_USEC_NATIVE */
|
||||||
return wtime / 1000000.0;
|
return wtime;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user