mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibLine: Use AK::Time instead of gettimeofday for history entries
This commit is contained in:
parent
80c259125c
commit
88fb2b0c9f
Notes:
github-actions[bot]
2025-02-13 02:15:00 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/88fb2b0c9ff Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3551 Reviewed-by: https://github.com/alimpfard ✅ Reviewed-by: https://github.com/shannonbooth
1 changed files with 2 additions and 3 deletions
|
@ -245,9 +245,8 @@ void Editor::add_to_history(ByteString const& line)
|
|||
return;
|
||||
if ((m_history.size() + 1) > m_history_capacity)
|
||||
m_history.take_first();
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, nullptr);
|
||||
m_history.append({ line, tv.tv_sec });
|
||||
auto now = UnixDateTime::now();
|
||||
m_history.append({ line, now.seconds_since_epoch() });
|
||||
m_history_dirty = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue