FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
task.cpp
浏览该文件的文档.
1// Copyright 2024 Arthur Sonzogni. 保留所有权利。
2// 此源代码的使用受 MIT 许可证的约束,该许可证可在 LICENSE 文件中找到。
4
5namespace ftxui::task {
6bool 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
PendingTask 表示一个计划在特定时间或尽快执行的任务。
std::optional< std::chrono::steady_clock::time_point > time
任务应该执行的时间。如果时间为空,则任务应尽快执行。
bool operator<(const PendingTask &other) const
定义 task.cpp:6