Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 30 seconds delay issue #156

Merged
merged 10 commits into from
Sep 4, 2023
Merged
Changes from 9 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
3 changes: 2 additions & 1 deletion LogMonitor/src/LogMonitor/LogFileMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ using namespace std;
/// \param LogDirectory: The log directory to be monitored
/// \param Filter: The filter to apply when looking fr log files
/// \param IncludeSubfolders: TRUE if subdirectories also needs to be monitored
/// \param WaitInSeconds: Waiting time in seconds to retry if folder/file to be monitored does not exist
///
LogFileMonitor::LogFileMonitor(_In_ const std::wstring& LogDirectory,
_In_ const std::wstring& Filter,
Expand Down Expand Up @@ -810,7 +811,7 @@ LogFileMonitor::LogFilesChangeHandler()
const DWORD eventsCount = 3;

LARGE_INTEGER liDueTime;
INT64 millisecondsToWait = 30000LL;
INT64 millisecondsToWait = 1000LL;
profnandaa marked this conversation as resolved.
Show resolved Hide resolved
liDueTime.QuadPart = -millisecondsToWait*10000LL; // wait time in 100 nanoseconds

HANDLE timerEvent = CreateWaitableTimer(NULL, FALSE, NULL);
TinaMor marked this conversation as resolved.
Show resolved Hide resolved
Expand Down