Skip to content

Commit f43d760

Browse files
committed
Fix WAIT
1 parent 053bf6e commit f43d760

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/aux/aux_compile_line.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,12 @@ void compile_line(vector<string> &tokens, compiler_state &state)
597597
// C++ Code
598598
#if defined(_WIN32)
599599
state.add_code(
600-
"_sleep((long int)" + get_c_expression(state, tokens[1]) + ");",
600+
"_sleep(" + get_c_expression(state, tokens[1]) + ".to_long_long());",
601601
state.where);
602602
#else
603603
state.add_code(
604-
"std::this_thread::sleep_for(std::chrono::milliseconds((long int)" +
605-
get_c_expression(state, tokens[1]) + "));",
604+
"std::this_thread::sleep_for(std::chrono::milliseconds(" +
605+
get_c_expression(state, tokens[1]) + ".to_long_long()));",
606606
state.where);
607607
#endif
608608
return;

src/ldpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ int main(int argc, const char *argv[])
347347

348348
// Generate the C++ compilation command
349349
string compile_line =
350-
"c++ ldpl-temp.cpp -std=gnu++11 -w -O3 -o " + final_filename;
350+
"c++ ldpl-temp.cpp -std=c++11 -w -O3 -o " + final_filename;
351351
#ifdef STATIC_BUILDS
352352
if (!no_static)
353353
compile_line += " -static-libgcc -static-libstdc++ ";

src/ldpl_lib/ldpl_lib.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <string>
1313
#include <unordered_map>
1414
#include <vector>
15+
#include <thread>
1516

1617
#define NVM_FLOAT_EPSILON 0.00000001
1718
#define CRLF "\n"

0 commit comments

Comments
 (0)