Output error on status interval < 1.
This commit is contained in:
parent
f375fc7b72
commit
c5e080218c
@ -378,8 +378,13 @@ int main(int argc, char** argv)
|
|||||||
if( argc > arg_index )
|
if( argc > arg_index )
|
||||||
{
|
{
|
||||||
iss.str( argv[arg_index] );
|
iss.str( argv[arg_index] );
|
||||||
unsigned int status_interval;
|
int status_interval;
|
||||||
iss >> status_interval;
|
iss >> status_interval;
|
||||||
|
if( status_interval < 1 )
|
||||||
|
{
|
||||||
|
std::cerr << "Status interval argument must be one or greater." << std::endl;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
cpu_usage_delay = status_interval * 1000000 - 100000;
|
cpu_usage_delay = status_interval * 1000000 - 100000;
|
||||||
++arg_index;
|
++arg_index;
|
||||||
}
|
}
|
||||||
@ -390,7 +395,7 @@ int main(int argc, char** argv)
|
|||||||
iss >> graph_lines;
|
iss >> graph_lines;
|
||||||
if( graph_lines < 1 )
|
if( graph_lines < 1 )
|
||||||
{
|
{
|
||||||
std::cerr << "graph lines argument must be one or greater." << std::endl;
|
std::cerr << "Graph lines argument must be one or greater." << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user