MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / saveTimeStamp

Method saveTimeStamp

tools/streamer_recorder/recorder.cpp:172–190  ·  view source on GitHub ↗

save timeStamp file for FPS syncing

Source from the content-addressed store, hash-verified

170
171// save timeStamp file for FPS syncing
172void Recorder::saveTimeStamp()
173{
174 // TODO: handle relative path + check Windows / UNIX compat.
175 std::ofstream fout("../recordings/timeStamp.txt");
176 if(fout.is_open())
177 {
178 std::cout << "recording lasted " << ((timeStamps[frameID-1]-timeStamps[0])/1000.0) << " sec(s), writing timeStamp data..." << std::endl;
179 fout << "# Elapsed time in ms # \n";
180 for(int i = 0; i<frameID; i++)
181 {
182 fout << (float)timeStamps[i];
183 fout << '\n';
184 }
185 }
186 else
187 {
188 std::cout << "File could not be opened." << std::endl;
189 }
190}

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected