aboutsummaryrefslogtreecommitdiff
path: root/src/threading.h
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-04-08 18:26:47 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-04-08 18:26:47 +0200
commit6efef88d0c7c155690dc2ac478d52e75da97d147 (patch)
tree9706bac4d419f0f242f69d283412f912e0b2b6fb /src/threading.h
parent96daea993eeea17f0c64325491943e48795ff751 (diff)
downloadlanes-6efef88d0c7c155690dc2ac478d52e75da97d147.tar.gz
lanes-6efef88d0c7c155690dc2ac478d52e75da97d147.tar.bz2
lanes-6efef88d0c7c155690dc2ac478d52e75da97d147.zip
C++ migration: lanes.now_secs uses std::chrono::sytem_clock. plus more enum class cleanup.
Diffstat (limited to 'src/threading.h')
-rw-r--r--src/threading.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/threading.h b/src/threading.h
index e9f302a..82c8f52 100644
--- a/src/threading.h
+++ b/src/threading.h
@@ -5,13 +5,6 @@
5#include <time.h> 5#include <time.h>
6#include <thread> 6#include <thread>
7 7
8/* Note: ERROR is a defined entity on Win32
9 PENDING: The Lua VM hasn't done anything yet.
10 RUNNING, WAITING: Thread is inside the Lua VM. If the thread is forcefully stopped, we can't lua_close() the Lua State.
11 DONE, ERROR_ST, CANCELLED: Thread execution is outside the Lua VM. It can be lua_close()d.
12*/
13enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
14
15#define THREADAPI_WINDOWS 1 8#define THREADAPI_WINDOWS 1
16#define THREADAPI_PTHREAD 2 9#define THREADAPI_PTHREAD 2
17 10
@@ -129,14 +122,6 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
129 #define THREAD_CALLCONV 122 #define THREAD_CALLCONV
130#endif //THREADAPI == THREADAPI_PTHREAD 123#endif //THREADAPI == THREADAPI_PTHREAD
131 124
132/*
133* 'time_d': <0.0 for no timeout
134* 0.0 for instant check
135* >0.0 absolute timeout in secs + ms
136*/
137using time_d = double;
138time_d now_secs(void);
139
140/*---=== Threading ===--- 125/*---=== Threading ===---
141*/ 126*/
142 127