API functions to get the CPU time used by a process differ between Windows, Linux, OSX, BSD, Solaris, and other UNIX-style OSes. This article provides a cross-platform function to get the process CPU time, and explains what works on what OS.