« get me outta code hell

Frame delay = 50 on normal client, 100 on telnet - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/client.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-07-19 16:11:23 -0300
committerFlorrie <towerofnix@gmail.com>2019-07-19 16:11:56 -0300
commit2e23b93ca1737859d3052bcd813be402a513b987 (patch)
treecdf0bda3881ede017504a1e27a3d2d5c01099116 /client.js
parent2a758cbaf1e4bbb4d72047a1729040f8f342d69b (diff)
Frame delay = 50 on normal client, 100 on telnet
Diffstat (limited to 'client.js')
-rw-r--r--client.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.js b/client.js
index 190c087..a899c2d 100644
--- a/client.js
+++ b/client.js
@@ -16,7 +16,7 @@ const {
   }
 } = require('./tui-lib')
 
-const setupClient = async ({backend, writable, interfacer, appConfig}) => {
+const setupClient = async ({backend, writable, interfacer, appConfig, frameRate = 50}) => {
   const cleanTerminal = () => {
     writable.write(ansi.cleanCursor())
     writable.write(ansi.disableAlternateScreen())
@@ -81,7 +81,7 @@ const setupClient = async ({backend, writable, interfacer, appConfig}) => {
   const renderInterval = setInterval(() => {
     root.renderTo(flushable)
     flushable.flush()
-  }, 100)
+  }, frameRate)
 
   return {appElement, cleanTerminal, flushable, renderInterval}
 }