diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-05-21 21:18:16 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-05-21 21:18:16 -0300 |
commit | a75f8963380a1f6ae8501f21a1d3f3bef8a89d91 (patch) | |
tree | ae561ded247f81565c8287b6fd4b816f6ec762e6 /scene/io/resource_format_image.cpp | |
parent | c195c0df6b36debc870216dd42e49fbda70fa861 (diff) |
First version of Profiler
It is now possible to profile GDScript as well as some parts of Godot
internals.
Diffstat (limited to 'scene/io/resource_format_image.cpp')
-rw-r--r-- | scene/io/resource_format_image.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp index 6174d134a3..f3a0eaa8c4 100644 --- a/scene/io/resource_format_image.cpp +++ b/scene/io/resource_format_image.cpp @@ -108,7 +108,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String& p_origin Error err = ImageLoader::load_image(p_path,&image); if (!err && debug_load_times) { - double total=(double)(OS::get_singleton()->get_ticks_usec()-begtime)/1000000.0; + double total=USEC_TO_SEC((OS::get_singleton()->get_ticks_usec()-begtime)); print_line("IMAGE: "+itos(image.get_width())+"x"+itos(image.get_height())); print_line(" -load: "+rtos(total)); } @@ -201,7 +201,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String& p_origin if (debug_load_times) { - total=(double)(OS::get_singleton()->get_ticks_usec()-begtime)/1000000.0; + total=USEC_TO_SEC(OS::get_singleton()->get_ticks_usec()-begtime); print_line(" -make texture: "+rtos(total)); } |