* don't try to test functionality the system told you wasn't there ;)
This commit was SVN r6959.
Этот коммит содержится в:
родитель
25701c739f
Коммит
85beffc8f9
@ -31,6 +31,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
printf("--> frequency: %llu\n", (unsigned long long) opal_timer_base_get_freq());
|
printf("--> frequency: %llu\n", (unsigned long long) opal_timer_base_get_freq());
|
||||||
|
|
||||||
|
#if OPAL_TIMER_CYCLE_SUPPORTED
|
||||||
printf("--> cycle count\n");
|
printf("--> cycle count\n");
|
||||||
start = opal_timer_base_get_cycles();
|
start = opal_timer_base_get_cycles();
|
||||||
start = opal_timer_base_get_cycles();
|
start = opal_timer_base_get_cycles();
|
||||||
@ -40,13 +41,20 @@ main(int argc, char *argv[])
|
|||||||
printf(" Slept approximately %llu cycles, or %llu us\n",
|
printf(" Slept approximately %llu cycles, or %llu us\n",
|
||||||
(unsigned long long) diff,
|
(unsigned long long) diff,
|
||||||
(unsigned long long) ((diff * 1000000) / opal_timer_base_get_freq()));
|
(unsigned long long) ((diff * 1000000) / opal_timer_base_get_freq()));
|
||||||
|
#else
|
||||||
|
printf("--> cycle count not supported\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OPAL_TIMER_USEC_SUPPORTED
|
||||||
printf("--> usecs\n");
|
printf("--> usecs\n");
|
||||||
start = opal_timer_base_get_usec();
|
start = opal_timer_base_get_usec();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
end = opal_timer_base_get_usec();
|
end = opal_timer_base_get_usec();
|
||||||
diff = end - start;
|
diff = end - start;
|
||||||
printf(" Slept approximately %llu us\n", (unsigned long long) diff);
|
printf(" Slept approximately %llu us\n", (unsigned long long) diff);
|
||||||
|
#else
|
||||||
|
printf("--> usec timer not supported\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
opal_finalize();
|
opal_finalize();
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user