summaryrefslogtreecommitdiff
path: root/common.cpp
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-04-08 13:36:34 -0400
committerGitHub <noreply@github.com>2023-04-08 13:36:34 -0400
commitc3946e1a73aec0eb75ff4301dc42e1a2a71aab60 (patch)
tree9bfd6b6df4666491295b30088a6bf7bec6f61757 /common.cpp
parent0fd63dfa5dfcac42a45f0b247e8461b4b969d6f7 (diff)
parent3180cb7584c037463ee5c2047aea3e3ed0f0b364 (diff)
Merge pull request #1 from ChausseBenjamin/console-uiHEADmaster
Diffstat (limited to 'common.cpp')
-rw-r--r--common.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/common.cpp b/common.cpp
new file mode 100644
index 0000000..5838766
--- /dev/null
+++ b/common.cpp
@@ -0,0 +1,13 @@
+#include "common.h"
+
+// Timing calculations {{{
+
+// NanoSeconds per Tick
+int nspt(const int nbpm, const int resolution){
+ // nbpm: 133000 = 133bpm
+ // resolution: Tick per beat
+ return 60000000000 / (nbpm * resolution);
+}
+
+// }}}
+// vim: syntax=cpp.doxygen