mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +00:00
Kernel: Remove the "kernel info page" used for fast gettimeofday()
We stopped using gettimeofday() in Core::EventLoop a while back, in favor of clock_gettime() for monotonic time. Maintaining an optimization for a syscall we're not using doesn't make a lot of sense, so let's go back to the old-style sys$gettimeofday().
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
namespace Kernel {
|
||||
|
||||
SchedulerData* g_scheduler_data;
|
||||
timeval g_timeofday;
|
||||
|
||||
void Scheduler::init_thread(Thread& thread)
|
||||
{
|
||||
@@ -596,10 +597,8 @@ void Scheduler::timer_tick(const RegisterState& regs)
|
||||
|
||||
++g_uptime;
|
||||
|
||||
timeval tv;
|
||||
tv.tv_sec = TimeManagement::the().epoch_time();
|
||||
tv.tv_usec = TimeManagement::the().ticks_this_second() * 1000;
|
||||
Process::update_info_page_timestamp(tv);
|
||||
g_timeofday.tv_sec = TimeManagement::the().epoch_time();
|
||||
g_timeofday.tv_usec = TimeManagement::the().ticks_this_second() * 1000;
|
||||
|
||||
if (Process::current->is_profiling()) {
|
||||
SmapDisabler disabler;
|
||||
|
||||
Reference in New Issue
Block a user