Skip to content

Commit

Permalink
Fix WAIT
Browse files Browse the repository at this point in the history
  • Loading branch information
Lartu committed Nov 9, 2024
1 parent 053bf6e commit f43d760
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/aux/aux_compile_line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,12 +597,12 @@ void compile_line(vector<string> &tokens, compiler_state &state)
// C++ Code
#if defined(_WIN32)
state.add_code(
"_sleep((long int)" + get_c_expression(state, tokens[1]) + ");",
"_sleep(" + get_c_expression(state, tokens[1]) + ".to_long_long());",
state.where);
#else
state.add_code(
"std::this_thread::sleep_for(std::chrono::milliseconds((long int)" +
get_c_expression(state, tokens[1]) + "));",
"std::this_thread::sleep_for(std::chrono::milliseconds(" +
get_c_expression(state, tokens[1]) + ".to_long_long()));",
state.where);
#endif
return;
Expand Down
2 changes: 1 addition & 1 deletion src/ldpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ int main(int argc, const char *argv[])

// Generate the C++ compilation command
string compile_line =
"c++ ldpl-temp.cpp -std=gnu++11 -w -O3 -o " + final_filename;
"c++ ldpl-temp.cpp -std=c++11 -w -O3 -o " + final_filename;
#ifdef STATIC_BUILDS
if (!no_static)
compile_line += " -static-libgcc -static-libstdc++ ";
Expand Down
1 change: 1 addition & 0 deletions src/ldpl_lib/ldpl_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string>
#include <unordered_map>
#include <vector>
#include <thread>

#define NVM_FLOAT_EPSILON 0.00000001
#define CRLF "\n"
Expand Down

0 comments on commit f43d760

Please sign in to comment.