mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
Add the ability to schedule scripts based on wallclock time (closes #1773)
This commit is contained in:
@@ -115,6 +115,8 @@ public:
|
||||
double timeout, std::string preScript = "", std::string postScript = "");
|
||||
void removeRepeatedScript(std::string_view identifier);
|
||||
|
||||
void scheduleScript(std::string script, double delay);
|
||||
|
||||
std::vector<std::string> allLuaFunctions() const;
|
||||
const std::vector<LuaLibrary>& allLuaLibraries() const;
|
||||
|
||||
@@ -158,6 +160,15 @@ private:
|
||||
};
|
||||
std::vector<RepeatedScriptInfo> _repeatedScripts;
|
||||
|
||||
struct ScheduledScriptInfo {
|
||||
// The script that should be executed
|
||||
std::string script;
|
||||
|
||||
// The application timestamp at which time the script should be executed
|
||||
double timestamp = 0.0;
|
||||
};
|
||||
std::vector<ScheduledScriptInfo> _scheduledScripts;
|
||||
|
||||
// Logging variables
|
||||
bool _logFileExists = false;
|
||||
bool _logScripts = true;
|
||||
|
||||
Reference in New Issue
Block a user