FTXUI
6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
task.cpp
浏览该文件的文档.
1
// Copyright 2024 Arthur Sonzogni. 保留所有权利。
2
// 此源代码的使用受 MIT 许可证的约束,该许可证可在 LICENSE 文件中找到。
3
#include "
ftxui/component/task_internal.hpp
"
4
5
namespace
ftxui::task
{
6
bool
PendingTask::operator<
(
const
PendingTask
& other)
const
{
7
if
(!
time
&& !other.
time
) {
8
return
false
;
9
}
10
if
(!
time
) {
11
return
true
;
12
}
13
if
(!other.
time
) {
14
return
false
;
15
}
16
return
time
.value() > other.
time
.value();
17
}
18
}
// namespace ftxui::task
ftxui::task
定义
screen_interactive.hpp:26
ftxui::task::PendingTask
PendingTask 表示一个计划在特定时间或尽快执行的任务。
定义
task_internal.hpp:16
ftxui::task::PendingTask::time
std::optional< std::chrono::steady_clock::time_point > time
任务应该执行的时间。如果时间为空,则任务应尽快执行。
定义
task_internal.hpp:28
ftxui::task::PendingTask::operator<
bool operator<(const PendingTask &other) const
定义
task.cpp:6
task_internal.hpp