Skip to content

Commit

Permalink
Log resource conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
vk2gpu committed Jan 21, 2018
1 parent aab9d82 commit 5be3cbb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/resource/private/converter_context.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "resource/private/converter_context.h"
#include "core/misc.h"
#include "core/timer.h"
#include "job/manager.h"

#include <algorithm>
Expand Down Expand Up @@ -69,7 +70,14 @@ namespace Resource
Core::FileCreateDir(destDir);

// Do conversion.
return converter->Convert(*this, sourceFile, destPath);
Core::Timer timer;
timer.Mark();

Core::Log("Converting \"%s\"...\n", sourceFile);
auto retVal = converter->Convert(*this, sourceFile, destPath);

Core::Log("...converted \"%s\" in %.2f ms.\n", sourceFile, timer.GetTime() * 1000.0f);
return retVal;
}

void ConverterContext::SetMetaData(MetaDataCb callback, void* metaData)
Expand Down

0 comments on commit 5be3cbb

Please sign in to comment.