Skip to content

Replace deprecated usleep() with std::this_thread::sleep_for()#1080

Draft
Copilot wants to merge 2 commits intofeature/VPLAY-12800_devfrom
copilot/sub-pr-1079
Draft

Replace deprecated usleep() with std::this_thread::sleep_for()#1080
Copilot wants to merge 2 commits intofeature/VPLAY-12800_devfrom
copilot/sub-pr-1079

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 25, 2026

Addresses review feedback on PR #1079 to modernize sleep calls in test code by replacing deprecated POSIX usleep() with standard C++11 threading primitives.

Changes:

  • Replace all usleep() calls with std::this_thread::sleep_for(std::chrono::milliseconds())
  • Remove <unistd.h> include (no longer needed)

Example:

// Before
usleep(100 * 1000);

// After
std::this_thread::sleep_for(std::chrono::milliseconds(100));

This aligns with the pattern already used in other test files (AampCurlDownloader/FunctionalTests.cpp, AampTsbMetaDataManagerTests, etc.) and improves portability by removing POSIX-specific dependencies.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: vinodkadungoth <33543349+vinodkadungoth@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error message display during long playback Replace deprecated usleep() with std::this_thread::sleep_for() Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants