(no subject)
Mar. 10th, 2003 10:50 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
There’s a system call on UNIX, clock(), that tells you how much CPU time your process has been using. This is different from total elapsed time because the computer is doing many things at once, and clock() just tells you how much time this particular process used.
Microsoft is in the habit of providing equivalents of UNIX system calls for its C developers, often with slight annoying differences in the name (like tacking on a leading underscore). This is something that I can cope with. But I really hate it when MSDN’s page on “Time Management” in the Run-Time Library Reference lists clock() under “Return elapsed CPU time for process”, then the actual page for clock() says “calculates the wall-clock time used by the calling process” and turns out to be using GetSystemTimeAsFileTime() under the covers. That’s just plain incompetent.