double PMPI_Wtime(void)
{
double time;
- time = SIMIX_get_clock();
+ if (smpi_process_initialized() && !smpi_process_finalized() && !smpi_sample_is_running) {
+ smpi_bench_end();
+ time = SIMIX_get_clock();
+ smpi_bench_begin();
+ } else {
+ time = SIMIX_get_clock();
+ }
return time;
}