]> git.vomp.tv Git - vompclient.git/commitdiff
Move getTimeMS() to Util
authorChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 16:56:38 +0000 (16:56 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 16:56:38 +0000 (16:56 +0000)
src/defines.h
src/main.cc
src/osdopengl.cc
src/osdopenvg.cc
src/util.cc
src/util.h

index 884d0d4314f4fc01214f5774ce9b33e106c983a7..dfdc7717815ff1b52f7da5b9b26c4516a9a28c61 100644 (file)
@@ -49,8 +49,6 @@ typedef uint64_t u8;
 
 // Global useful functions
 
-long long getTimeMS();
-
 int getClockRealTime(struct timespec *tp);
 
 //#define WINDOWS_LEGACY
index 9a0f1a895ba182092a120a86a9237a5c209854cb..38f0014fb1b5170b2a5a4ca6cef1b2ddc0dc3daa 100644 (file)
@@ -312,13 +312,6 @@ void threadSignalReceiverFunction()
 
 // -------------------------------------------------------------------------------------------------------------------
 
-long long getTimeMS()
-{
-  struct timespec ts;
-  clock_gettime(VOMP_LINUX_CLOCK, &ts);
-  return ts.tv_sec * 1000 + ts.tv_nsec / 1000000LL;
-}
-
 int getClockRealTime(struct timespec *tp) // FIXME - del if all goes chrono
 {
   return clock_gettime(CLOCK_REALTIME, tp);
index f7f26432f51468e6bc79b35fada9c2e8d283e069..f22051b03235fb2b8ebabe2e399519254864d3a6 100644 (file)
@@ -21,6 +21,7 @@
 #include "surfaceopengl.h"
 #include "message.h"
 #include "control.h"
+#include "util.h"
 
 #include "osdopengl.h"
 
index 39f9922ab903286ae5914d648d33d823ea72ee1e..541a76e23361287161b50bef64a5068b5021ed34 100644 (file)
@@ -29,6 +29,7 @@
 #include "surface.h"
 #include "messagequeue.h"
 #include "teletxt/txtfont.h"
+#include "util.h"
 
 #include "osdopenvg.h"
 
index 6644b828d821f567cbb7be712ccd55e4de842bc5..9de85906010051316024b9bbdfb66d4e1303583a 100644 (file)
@@ -128,3 +128,9 @@ int min(UINT a, int b)
   else return a;
 }
 
+i8 getTimeMS()
+{
+  struct timespec ts;
+  clock_gettime(VOMP_LINUX_CLOCK, &ts);
+  return ts.tv_sec * 1000 + ts.tv_nsec / 1000000LL;
+}
index b91e15e49f645706480275cbd0b10b2b3e16597f..5db86d4caca6d85173ef2eb79b40c05ee4bedf47 100644 (file)
@@ -28,6 +28,7 @@
 void MILLISLEEP(u4 a);
 std::string tp2str(const std::chrono::time_point<std::chrono::system_clock>& tp);
 void dump(void* data, int length);
+i8 getTimeMS();
 
 //u8 htonll(u8 a);
 //u8 ntohll(u8 a);