Skip to content

Commit

Permalink
benchmark text: remove trailing zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
Maverick Tse authored and Maverick Tse committed Oct 30, 2016
1 parent bf26f10 commit 69e02f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions SigColorFastAviUtl/SigColorFastAviUtl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
<FloatingPointModel>Fast</FloatingPointModel>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<AdditionalOptions>/Qpar-report:1 %(AdditionalOptions)</AdditionalOptions>
<Parallelization>false</Parallelization>
<GenerateAlternateCodePaths>None</GenerateAlternateCodePaths>
<UseProcessorExtensions>SSE42</UseProcessorExtensions>
<Cpp0xSupport>true</Cpp0xSupport>
<UseIntelOptimizedHeaders>false</UseIntelOptimizedHeaders>
<OptimizeForWindowsApplication>true</OptimizeForWindowsApplication>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
10 changes: 8 additions & 2 deletions SigColorFastAviUtl/sigcolorfastaviutl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ BOOL func_proc_con(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
end_con = std::chrono::steady_clock::now();
std::chrono::duration<double> elapsed = std::chrono::duration_cast<std::chrono::duration<double>>( end_con - start_con);
auto sec = elapsed.count() * 1000;
std::string msg = "SCon:" + std::to_string(std::round(sec)) + "ms @" + std::to_string(fpip->w) + "x" + std::to_string(fpip->h);
auto timestr = std::to_string(std::round(sec));
auto decimal = timestr.find('.');
auto cleaned = timestr.substr(0, decimal);
std::string msg = "SCon:" + cleaned + "ms @" + std::to_string(fpip->w) + "x" + std::to_string(fpip->h);
SetWindowText(fp->hwnd, msg.c_str());
fp->exfunc->filter_window_update(fp);
}
Expand Down Expand Up @@ -506,7 +509,10 @@ BOOL func_proc_sd(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
end_sd = std::chrono::steady_clock::now();
std::chrono::duration<double> elapsed = std::chrono::duration_cast<std::chrono::duration<double>>(end_sd - start_sd);
auto sec = elapsed.count()*1000.0;
std::string msg = "SDeCon:" + std::to_string(std::round(sec)) + "ms @" + std::to_string(fpip->w) + "x" + std::to_string(fpip->h);
auto timestr = std::to_string(std::round(sec));
auto decimal = timestr.find('.');
auto cleaned = timestr.substr(0, decimal);
std::string msg = "SDeCon:" + cleaned + "ms @" + std::to_string(fpip->w) + "x" + std::to_string(fpip->h);
SetWindowText(fp->hwnd, msg.c_str());
fp->exfunc->filter_window_update(fp);
}
Expand Down

0 comments on commit 69e02f0

Please sign in to comment.