mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-30 16:49:01 +08:00
Remove pthread dependency
This commit is contained in:
20
src/ftxui/component/task.cpp
Normal file
20
src/ftxui/component/task.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2024 Arthur Sonzogni. All rights reserved.
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include "ftxui/component/task_internal.hpp"
|
||||
|
||||
namespace ftxui::task {
|
||||
bool PendingTask::operator<(const PendingTask& other) const {
|
||||
if (!time && !other.time) {
|
||||
return false;
|
||||
}
|
||||
if (!time) {
|
||||
return true;
|
||||
}
|
||||
if (!other.time) {
|
||||
return false;
|
||||
}
|
||||
return time.value() > other.time.value();
|
||||
}
|
||||
} // namespace ftxui::task
|
||||
|
Reference in New Issue
Block a user