[fpc-pascal] How to find where my app consumes CPU?
Marco van de Voort
fpc at pascalprogramming.org
Wed May 19 11:45:34 CEST 2021
Op 2021-05-18 om 23:29 schreef Travis Siegel via fpc-pascal:
> I'm not positive, but I'm pretty sure the sleep command in linux does
> not behave the same way it does in windows.
>
> As you know, in windows, a sleep command (even if delivered with a
> parameter of 0) gives up time slices to other programs on the system.
> This does not appear to be the case on linux.
>
> On linux, the sleep command simply suspends the process for the
> specified amount of time, but so far as I can tell, does nothing for
> unused cpu cycles.
This is what "suspend" means, that process doesn't compete for cycles,
so they go to the other processes. Since the sleep is a kernel call, I
can't really imagine why this would not be the case.
So my guess something else is spinning (e.g. in a thread).
More information about the fpc-pascal
mailing list