Skip to content

Why are systems timings using cpuTime? #26

@ul

Description

@ul

Hi, thanks for a wonderful ECS library, it was a pleasure to use so far!

I recently was surprised by the behaviour of my first system with timings: stRunEvery, as it was triggering much less frequently than I expected. Turned out, since I run systems on every frame, and they finish quickly, with the CPU utilisation way below 100%, cpuTime was ticking slower than the real time; c.f. cpuTime docs:

Gets time spent that the CPU spent to run the current process in seconds. This may be more useful for benchmarking than epochTime. However, it may measure the real time instead (depending on the OS). The value of the result has no meaning. To generate useful timing values, take the difference between the results of two cpuTime calls.

Is it a deliberate design choice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions