本文整理汇总了C++中CStopWatch::StartTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ CStopWatch::StartTimer方法的具体用法?C++ CStopWatch::StartTimer怎么用?C++ CStopWatch::StartTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStopWatch
的用法示例。
在下文中一共展示了CStopWatch::StartTimer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
// ****************************************************************************
int main(int argc, char *argv[])
{
init_params();
if(!parse_params(argc, argv))
{
show_usage();
return 0;
}
else {
cerr << "FAMSA (Fast and Accurate Multiple Sequence Alignment) ver. " << FAMSA_VER << " CPU and GPU\n";
cerr << " by " << FAMSA_AUTHORS << " (" << FAMSA_DATE << ")\n\n";
}
CStopWatch timer;
timer.StartTimer();
CParams params;
CFAMSA famsa;
set_famsa_params(params);
// ***** Read input file
CInputFile in_file;
COutputFile out_file;
if (execution_params.verbose_mode)
cerr << "Processing: " << execution_params.input_file_name << "\n";
if(!in_file.ReadFile(execution_params.input_file_name))
{
cout << "Error: no (or incorrect) input file\n";
return 0;
}
vector<CSequence> sequences;
in_file.StealSequences(sequences);
// ***** Load sequences to FAMSA
if(!famsa.SetSequences(std::move(sequences)))
return 0;
if(!famsa.SetParams(params))
{
cout << "Error: No input sequences\n";
return 0;
}
if(!famsa.ComputeMSA())
{
cout << "Some interal error occured!\n";
return 0;
}
vector<CGappedSequence*> result;
famsa.GetAlignment(result);
out_file.PutSequences(std::move(result));
out_file.SaveFile(execution_params.output_file_name);
timer.StopTimer();
if (execution_params.verbose_mode)
cerr << "Total computation time: " << timer.GetElapsedTime() << "s\n";
cerr << "Done!\n";
return 0;
}