diff options
author | Alexander Momchilov <alexandermomchilov@gmail.com> | 2020-12-08 23:12:44 -0500 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-12-19 21:30:39 +0100 |
commit | 67ccd6b909d28ab84c77acecdfee927337489cc2 (patch) | |
tree | 25c9c86935167f733356a387fdc6656a0aaef292 /darwin/DarwinProcess.h | |
parent | f614b8a19fe92cd13862605c16d69aa23c8b9bd1 (diff) |
Unhardcode tick-to-ms conversion
Division by 100000.0 worked because `sysconf(_SC_CLK_TCK)` happened to be 100.
By unhardcoding:
1) It becomes more clear what this 100000.0 figure comes from.
2) It protects against bugs in the case `sysconf(_SC_CLK_TCK)` ever changes.
Diffstat (limited to 'darwin/DarwinProcess.h')
-rw-r--r-- | darwin/DarwinProcess.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/darwin/DarwinProcess.h b/darwin/DarwinProcess.h index 21da34af..f87dd182 100644 --- a/darwin/DarwinProcess.h +++ b/darwin/DarwinProcess.h @@ -34,7 +34,7 @@ bool Process_isThread(const Process* this); void DarwinProcess_setFromKInfoProc(Process* proc, const struct kinfo_proc* ps, bool exists); -void DarwinProcess_setFromLibprocPidinfo(DarwinProcess* proc, DarwinProcessList* dpl); +void DarwinProcess_setFromLibprocPidinfo(DarwinProcess* proc, DarwinProcessList* dpl, double time_interval); /* * Scan threads for process state information. |