Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ mini-trading-engine/
```bash
# With tests and benchmarks
Remove-Item -Recurse -Force build -ErrorAction SilentlyContinue
cmake -B build -DBUILD_BENCHMARKS=ON -DBUILD_TESTS=ON

cmake -S . -B build `
-DCMAKE_PREFIX_PATH="C:/Users/matthew/whirlpool-install" `
-DBUILD_BENCHMARKS=ON `
-DBUILD_TESTS=ON

cmake --build build --config Release
```

Expand Down
1 change: 0 additions & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ foreach(bench_target
)
target_include_directories(${bench_target} PRIVATE
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/third_party/whirlpool/include
)
if(WIN32)
target_link_libraries(${bench_target} ws2_32 shlwapi)
Expand Down
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ int main(int argc, char* argv[]) {

std::cout << "=== MARKET OPEN ===" << std::endl;
std::cout << "Trading for " << duration_minutes << " minutes..." << std::endl;
std::this_thread::sleep_for(std::chrono::minutes(duration_minutes));
const auto trading_deadline =
std::chrono::steady_clock::now() + std::chrono::minutes(duration_minutes);
while (g_running && std::chrono::steady_clock::now() < trading_deadline) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
std::cout << "=== MARKET CLOSE ===" << std::endl;

g_running = false;
Expand Down
Loading