GithubHelp home page GithubHelp logo

Comments (2)

chrisdonlan avatar chrisdonlan commented on July 28, 2024

In order to get around this, I deleted the following function entirely (there are no uses in the project):

  void* LoadNmvlLibrary()

And I commented out the content here:

  float getCpuLoad()
  {
      /*
    static uint64_t _previousTotalTicks = 0;
    static uint64_t _previousIdleTicks  = 0;

    FILETIME idleTime, kernelTime, userTime;
    GetSystemTimes(&idleTime, &kernelTime, &userTime);

    auto FileTimeToInt64 = [](const FILETIME& ft) {
      return (((uint64_t)(ft.dwHighDateTime)) << 32) | ((uint64_t)ft.dwLowDateTime);
    };

    auto totalTicks = FileTimeToInt64(kernelTime) + FileTimeToInt64(userTime);
    auto idleTicks  = FileTimeToInt64(idleTime);

    uint64_t totalTicksSinceLastTime = totalTicks - _previousTotalTicks;
    uint64_t idleTicksSinceLastTime  = idleTicks - _previousIdleTicks;

    float result = 1.0f - ((totalTicksSinceLastTime > 0) ? ((float)idleTicksSinceLastTime) / totalTicksSinceLastTime : 0);

    _previousTotalTicks = totalTicks;
    _previousIdleTicks  = idleTicks;
       */

    // return result * 100.f;
    return -1 * 100.f;
  }

The CPU function seems approachable, so I am working on a linux work-around to get the CPU load in either a cross platform manner, or a switchable manner with macros.

But, I would have no idea where to start in LoadNmvlLibrary().

from vk_raytrace.

mklefrancois avatar mklefrancois commented on July 28, 2024

We should have it working under Linux. Thanks for reporting.

from vk_raytrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.