AutoLogTime.cpp 568 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "EditorDefs.h"
  9. #include "AutoLogTime.h"
  10. CAutoLogTime::CAutoLogTime(const char* what)
  11. {
  12. m_what = what;
  13. CLogFile::FormatLine("---- Start: %s", m_what);
  14. m_t0 = GetTickCount();
  15. }
  16. CAutoLogTime::~CAutoLogTime()
  17. {
  18. m_t1 = GetTickCount();
  19. CLogFile::FormatLine("---- End: %s (%d seconds)", m_what, (m_t1 - m_t0) / 1000);
  20. }