diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-06 18:02:28 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-06 18:02:28 +0200 |
commit | 29a94302465c2bb6879e1750606fb4b4c533313b (patch) | |
tree | 37d9969bba8f5e8453e9f92e4f9b1757456c2515 /LibCore | |
parent | bf905225e7f674204376650325f41081143aeca5 (diff) | |
download | serenity-29a94302465c2bb6879e1750606fb4b4c533313b.zip |
AK: Make timeval_add() and timeval_sub() take references.
Diffstat (limited to 'LibCore')
-rw-r--r-- | LibCore/CElapsedTimer.cpp | 2 | ||||
-rw-r--r-- | LibCore/CEventLoop.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/LibCore/CElapsedTimer.cpp b/LibCore/CElapsedTimer.cpp index e783f59b0d..4e8902d348 100644 --- a/LibCore/CElapsedTimer.cpp +++ b/LibCore/CElapsedTimer.cpp @@ -15,6 +15,6 @@ int CElapsedTimer::elapsed() const struct timeval now; gettimeofday(&now, nullptr); struct timeval diff; - AK::timeval_sub(&now, &m_start_time, &diff); + timeval_sub(now, m_start_time, diff); return diff.tv_sec * 1000 + diff.tv_usec / 1000; } diff --git a/LibCore/CEventLoop.cpp b/LibCore/CEventLoop.cpp index 3fca8b9239..3bfe98893f 100644 --- a/LibCore/CEventLoop.cpp +++ b/LibCore/CEventLoop.cpp @@ -191,7 +191,7 @@ void CEventLoop::wait_for_event(WaitMode mode) if (!s_timers->is_empty() && queued_events_is_empty) { gettimeofday(&now, nullptr); get_next_timer_expiration(timeout); - AK::timeval_sub(&timeout, &now, &timeout); + timeval_sub(timeout, now, timeout); } else { should_wait_forever = true; } |