Skip to content

Commit

Permalink
Merge pull request #142 from asamitov/verbose_frame_times
Browse files Browse the repository at this point in the history
Extend with printing frame times.
  • Loading branch information
forderud authored Oct 9, 2019
2 parents 02cf934 + 3e0f9d9 commit d2d0472
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SandboxTest/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,23 @@ void ParseSource (IImage3dSource & source, bool verbose, bool profile) {
CHECK(source.GetFrameCount(&frame_count));
std::wcout << L"Frame count: " << frame_count << L"\n";

CComSafeArray<double> frame_times;
{
SAFEARRAY * data = nullptr;
CHECK(source.GetFrameTimes(&data));
frame_times.Attach(data);
data = nullptr;
}

if (verbose)
{
std::cout << "Frame times:\n";
for (unsigned int i = 0; i < frame_times.GetCount(); i++) {
double time = frame_times[(int)i];
std::cout << " " << time << "\n";
}
}

CComSafeArray<unsigned int> color_map;
{
SAFEARRAY * tmp = nullptr;
Expand Down

0 comments on commit d2d0472

Please sign in to comment.