FTXUI
6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
task.cpp
Go to the documentation of this file.
1
// Copyright 2024 Arthur Sonzogni. All rights reserved.
2
// Use of this source code is governed by the MIT license that can be found in
3
// the LICENSE file.
4
#include "
ftxui/component/task_internal.hpp
"
5
6
namespace
ftxui::task
{
7
bool
PendingTask::operator<
(
const
PendingTask
& other)
const
{
8
if
(!
time
&& !other.
time
) {
9
return
false
;
10
}
11
if
(!
time
) {
12
return
true
;
13
}
14
if
(!other.
time
) {
15
return
false
;
16
}
17
return
time
.value() > other.
time
.value();
18
}
19
}
// namespace ftxui::task
ftxui::task
Definition
screen_interactive.hpp:26
ftxui::task::PendingTask
PendingTask 代表一個預計在特定時間或盡快執行的任務。
Definition
task_internal.hpp:16
ftxui::task::PendingTask::time
std::optional< std::chrono::steady_clock::time_point > time
任務應該執行的時間。如果時間為空,則任務應盡快執行。
Definition
task_internal.hpp:28
ftxui::task::PendingTask::operator<
bool operator<(const PendingTask &other) const
Definition
task.cpp:7
task_internal.hpp