From 0bdade1b6cb40c5bd374a93ac0489058a7421bb5 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 2 May 2023 09:02:22 +1000 Subject: Introduce Machine class for host-specific info (split from ProcessList) First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes. --- DateMeter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DateMeter.c') diff --git a/DateMeter.c b/DateMeter.c index 96285963..b38f43b0 100644 --- a/DateMeter.c +++ b/DateMeter.c @@ -22,10 +22,10 @@ static const int DateMeter_attributes[] = { }; static void DateMeter_updateValues(Meter* this) { - const ProcessList* pl = this->pl; + const Machine* host = this->host; struct tm result; - const struct tm* lt = localtime_r(&pl->realtime.tv_sec, &result); + const struct tm* lt = localtime_r(&host->realtime.tv_sec, &result); this->values[0] = lt->tm_yday; int year = lt->tm_year + 1900; if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { -- cgit v1.2.3