diff options
author | elfmz <fenix1905@tut.by> | 2022-10-28 00:07:37 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2022-10-28 00:07:37 +0300 |
commit | 011b24338ab26b8d16b10b17d3f49d407907baaf (patch) | |
tree | efc83b2b645c9e7993e05e05d7cd8e33a4ec0ecf /far2l/src/mix | |
parent | a2ece88875e4038ef330765439af9eff8520a2de (diff) |
cosmetic
Diffstat (limited to 'far2l/src/mix')
-rw-r--r-- | far2l/src/mix/MountInfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/far2l/src/mix/MountInfo.cpp b/far2l/src/mix/MountInfo.cpp index cac3efe2..e799a93c 100644 --- a/far2l/src/mix/MountInfo.cpp +++ b/far2l/src/mix/MountInfo.cpp @@ -27,6 +27,8 @@ #include <Threaded.h> #include <os_call.hpp> +#define DISK_SPACE_QUERY_TIMEOUT_MSEC 1000 + static struct FSMagic { const char *name; unsigned int magic; @@ -298,11 +300,12 @@ MountInfo::MountInfo(bool for_location_menu) if (_mountpoints->pending.cnt == 0) { break; } - _mountpoints->pending.cond.wait_for(lock, std::chrono::milliseconds(1000 - ms)); + _mountpoints->pending.cond.wait_for(lock, + std::chrono::milliseconds(DISK_SPACE_QUERY_TIMEOUT_MSEC - ms)); } ms+= (std::chrono::duration_cast< std::chrono::milliseconds > (std::chrono::steady_clock::now().time_since_epoch()) - ms_before).count(); - if (ms >= 1000) { + if (ms >= DISK_SPACE_QUERY_TIMEOUT_MSEC) { fprintf(stderr, "%s: timed out\n", __FUNCTION__); break; } |