Browse Source

change timer

micha 2 years ago
parent
commit
a5af848fb5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      remote/fader_in.py

+ 5 - 1
remote/fader_in.py

@@ -39,6 +39,9 @@ mc.delete("another_key")
 import time
 import time
 import json
 import json
 data = {}
 data = {}
+start = time.time()
+delta = start
+
 while 1:
 while 1:
     send = 0
     send = 0
     try:
     try:
@@ -61,7 +64,8 @@ while 1:
         #data = input("<")
         #data = input("<")
 
 
         v = x[ch]
         v = x[ch]
-        cmd={"iDMX":ch,"iVAL":v,"iT":round(time.time(),2)} #".format(ch,v)
+        delta = time.time()-start
+        cmd={"iDMX":ch,"iVAL":v,"iT":round(delta,2)} #".format(ch,v)
         cmd = json.dumps([cmd])
         cmd = json.dumps([cmd])
         if ch in data:
         if ch in data:
             if data[ch] != v:
             if data[ch] != v: