summaryrefslogtreecommitdiffstats
path: root/ClockMeter.c
AgeCommit message (Collapse)Author
2023-12-26Update includes based on IWYUBenny Baumann
2023-08-31Rename ProcessList to ProcessTable throughoutNathan Scott
Following up with some discusson from a few months back, where it was proposed that ProcessTable is a better name. This data structure is definitely not a list ... if it was one-dimensional it'd be a set, but in practice it has much more in common with a two-dimensional table. The Process table is a familiar operating system concept for many people too so it resonates a little in that way as well.
2023-05-08Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott
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.
2021-09-22Update license headers to explicitly say GPLv2+Daniel Lange
2021-05-10cleaned up includes with iwyumayurdahibhate
2021-04-05Request the realtime and monotonic clock times once per sampleNathan Scott
Refactor the sample time code to make one call to gettimeofday (aka the realtime clock in clock_gettime, when available) and one to the monotonic clock. Stores each in more appropriately named ProcessList fields for ready access when needed. Every platform gets the opportunity to provide their own clock code, and the existing Mac OS X specific code is moved below darwin instead of in Compat. A couple of leftover time(2) calls are converted to use these ProcessList fields as well, instead of yet again sampling the system clock. Related to https://github.com/htop-dev/htop/pull/574
2021-04-05Merging all the points related to calculating time in one placeSohaib
The end goal is to consolidate all the points in htop that can only work in live-only mode today, so that will be able to inject PCP archive mode and have a chance at it working. The biggest problem we've got at this moment is all the places that are independently asking the kernel to 'give me the time right now'. Each of those needs to be audited and ultimately changed to allow platforms to manage their own idea of time. So, all the calls to gettimeofday(2) and time(2) are potential problems. Ultimately I want to get these down to just one or two. Related to https://github.com/htop-dev/htop/pull/574
2021-03-04Save text buffer in MeterChristian Göttsche
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2020-12-06Use size_t as len type for Meter_UpdateValuesChristian Göttsche
Most of the time the parameter is passed to snprintf type functions
2020-11-02Spacing around operatorsBenny Baumann
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-07Mark Object instances constChristian Göttsche
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-29Covert Meter attributes to file-local constant arraysChristian Göttsche
2020-09-03Axe automated header generation.Zev Weiss
Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
2016-05-04Rename Meter.setValues() functions to updateValues()Explorer09
Rationale (copied from htop issue #471): The function name "setValues" is misleading. For most OOP (object- oriented programming) contexts, setXXX functions mean they will change some member variables of an object into something specified in function arguments. But in the *Meter_setValues() case, the new values are not from the arguments, but from a hard-coded source. The caller is not supposed to change the values[] to anything it likes, but rather to "update" the values from the source. Hence, updateValues is a better name for this family of functions.
2016-03-11Explicit "maxItems" property of metersExplorer09
Two changes in this commit: - All meters now explicitly specify "maxItems" property, even for just 1 item. (Exception is "container" CPU meter classes, which use CUSTOM_METERMODE.) - "maxItems" being 0 is now allowed. This will let bar meters and graph meters render an empty meter.
2015-08-28get a useful tolal for clock meterChristian Hesse
2014-04-21Use reentrant version to silence warnings.Hisham Muhammad
2014-01-16BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad
See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
2012-12-05Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad
UTF-8 display of big numbers.
2011-12-26Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad
2011-12-26major header cleanupHisham Muhammad
2011-05-26Tempus fugit.Hisham Muhammad
2010-02-25Tempus fugit.Hisham Muhammad
2008-03-09Clean up headers by using 'static' whenever possible.Hisham Muhammad
Reduces resulting code size.
2006-06-06Updates for new version of the MakeHeader.py script.Hisham Muhammad
2006-04-10- Overhaul meters implementation;Hisham Muhammad
- add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
2006-03-04Initial import.Hisham Muhammad