medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 688036dc8def49459da6a1de3b4eedc896be9ac8
parent 78c2f3cb1e12ecc3b5a85602293625022e5cca44
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Jan 18 23:51:45 +0200

Use platform_time instead of GLFW in the profiler

Diffstat:
profiler.cc | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/profiler.cc b/profiler.cc @@ -6,9 +6,7 @@ #include "str.h" #include "strlcpy.h" #include "log.h" - -#define GLFW_INCLUDE_NONE -#include "libs/glfw/include/GLFW/glfw3.h" +#include "platform_time.h" struct Timer { const char * name; @@ -59,7 +57,7 @@ void profiler_push( u32 timer_idx ) { ASSERT( timer_stack_top < TIMER_STACK_SIZE ); timer_stack[ timer_stack_top ].timer_idx = timer_idx; - timer_stack[ timer_stack_top ].pushed_at = glfwGetTime(); + timer_stack[ timer_stack_top ].pushed_at = get_time(); timer_stack_top++; } @@ -94,7 +92,7 @@ static void write_frame( double frame_dt ) { void profiler_pop( const char * name ) { ASSERT( timer_stack_top > 0 ); - double now = glfwGetTime(); + double now = get_time(); timer_stack_top--; u32 idx = timer_stack[ timer_stack_top ].timer_idx;