Skip to content

Commit d2d0472

Browse files
authored
Merge pull request #142 from asamitov/verbose_frame_times
Extend with printing frame times.
2 parents 02cf934 + 3e0f9d9 commit d2d0472

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

SandboxTest/Main.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ void ParseSource (IImage3dSource & source, bool verbose, bool profile) {
9292
CHECK(source.GetFrameCount(&frame_count));
9393
std::wcout << L"Frame count: " << frame_count << L"\n";
9494

95+
CComSafeArray<double> frame_times;
96+
{
97+
SAFEARRAY * data = nullptr;
98+
CHECK(source.GetFrameTimes(&data));
99+
frame_times.Attach(data);
100+
data = nullptr;
101+
}
102+
103+
if (verbose)
104+
{
105+
std::cout << "Frame times:\n";
106+
for (unsigned int i = 0; i < frame_times.GetCount(); i++) {
107+
double time = frame_times[(int)i];
108+
std::cout << " " << time << "\n";
109+
}
110+
}
111+
95112
CComSafeArray<unsigned int> color_map;
96113
{
97114
SAFEARRAY * tmp = nullptr;

0 commit comments

Comments
 (0)