Computes the CPU Time.
More...
|
void | ShowTime (Timer arg) |
| Writes on screen the estimation of total and remaining CPU times. These informations are stored in the timer arg. More...
|
|
void ShowTime |
( |
Timer |
arg | ) |
|
Writes on screen the estimation of total and remaining CPU times. These informations are stored in the timer arg.
- Parameters
-
- Returns
- void
28 unsigned int tctime, rctime;
30 int day, hour, min, sec;
53 printf(
"\033[1A\033[1A");
56 printf(
"Total CPU time (estimation) : %5d day %2d h %2d min %2d s\n", day, hour, min, sec);
58 if ((tctime < 86400)&&(tctime >= 3600))
59 printf(
"Total CPU time (estimation) : %2d h %2d min %2d s \n", hour, min, sec);
61 if ((tctime < 3600)&&(tctime >= 60))
62 printf(
"Total CPU time (estimation) : %2d min %2d s \n", min, sec);
65 printf(
"Total CPU time (estimation) : %2d s \n", sec);
79 printf(
"Remaining CPU time (estimation) : %5d day %2d h %2d min %2d s\n", day, hour, min, sec);
81 if ((rctime < 86400)&&(rctime >= 3600))
82 printf(
"Remaining CPU time (estimation) : %2d h %2d min %2d s \n", hour, min, sec);
84 if ((rctime < 3600)&&(rctime >= 60))
85 printf(
"Remaining CPU time (estimation) : %2d min %2d s \n", min, sec);
88 printf(
"Remaining CPU time (estimation) : %2d s \n", sec);
int IterationNb
Definition: Parameters.cpp:37
double CPUTime()
Returns CPU time from previous start in seconds.
Definition: Timer.cpp:124
int IterationNo
Definition: Parameters.cpp:168