mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 01:09:25 +00:00
LibLine: Use AK::Time instead of gettimeofday for history entries
This commit is contained in:
committed by
Andrew Kaster
parent
80c259125c
commit
88fb2b0c9f
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user