Skip to content

On a multiprocessor unit, examples report incorrect % CPU usage #12

@yblake

Description

@yblake

GetSystemTimes return sum of the designated times across all processors, so there is no need to multiply the result by CpuCount().

GetSystemTimes function (processthreadsapi.h)

Change proposed for GetCpuTime method of CpuMonitor class in ndcommon.h :
return (100.0 - (((endIdle - startIdle) * 100) / (endCpu - startCpu)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions