shithub: orca

Download patch

ref: fe6df133702f992ac2e919ff538e063b4e9510e4
parent: dea51cc9b0c9b24d981d7f5eca939f0f3b39dfa2
author: cancel <cancel@cancel.fm>
date: Fri Dec 21 05:42:35 EST 2018

Cleanup

--- a/tui_main.c
+++ b/tui_main.c
@@ -13,8 +13,8 @@
 #include "sokol_time.h"
 #undef SOKOL_IMPL
 
-#define SPIN_TRACK 0
-#if SPIN_TRACK
+#define TIME_DEBUG 0
+#if TIME_DEBUG
 static int spin_track_timeout = 0;
 #endif
 
@@ -936,7 +936,7 @@
   if (!a->is_playing)
     return;
   bool do_play = false;
-#if SPIN_TRACK
+#if TIME_DEBUG
   Usz spins = 0;
   U64 spin_start = stm_now();
 #endif
@@ -947,7 +947,7 @@
     if (sdiff >= secs_span) {
       a->clock = now;
       a->accum_secs = sdiff - secs_span;
-#if SPIN_TRACK
+#if TIME_DEBUG
       if (a->accum_secs > 0.000001) {
         fprintf(stderr, "err: %f\n", a->accum_secs);
         if (a->accum_secs > 0.00005) {
@@ -960,11 +960,11 @@
     }
     if (secs_span - sdiff > ms_to_sec(0.1))
       break;
-#if SPIN_TRACK
+#if TIME_DEBUG
     ++spins;
 #endif
   }
-#if SPIN_TRACK
+#if TIME_DEBUG
   if (spins > 0) {
     fprintf(stderr, "%d spins in %f us with timeout %d\n", (int)spins,
             stm_us(stm_since(spin_start)), spin_track_timeout);
@@ -1935,7 +1935,7 @@
       if (new_timeout != cur_timeout) {
         wtimeout(stdscr, new_timeout);
         cur_timeout = new_timeout;
-#if SPIN_TRACK
+#if TIME_DEBUG
         spin_track_timeout = cur_timeout;
 #endif
       }