encyclopegia.org

CPU time

CPU time (or process time) is the amount of time that a central processing unit (CPU) was used for processing a specific set of instructions of a computer program or operating system, as opposed to total time from start to finish, where the CPU might have spent time on other processes. See the figure. CPU time is measured in clock ticks or seconds. Sometimes it is useful to convert CPU time into a percentage of the CPU capacity, giving the CPU usage. Measuring CPU time for two functionally identical programs that process identical inputs can indicate which program is faster, but it is a common misunderstanding that CPU time can be used to compare algorithms. Comparing programs by their CPU time compares specific implementations of algorithms. (It is possible to have both efficient and inefficient implementations of the same algorithm.) Algorithms are more commonly compared using measures of time complexity and space complexity. Typically, the CPU time used by a program is measured by the operating system, which schedules all of the work of the CPU. Modern multitasking operating systems run hundreds of processes. (A process is a running program.) Upon starting a process, the operating system records the time using an internal timer. When the process is suspended or terminated, the operating system again records the time.…

CPU time (or process time) is the amount of time that a central processing unit (CPU) was used for processing a specific set of instructions of a computer program or operating system, as opposed to total time from start to finish, where the CPU might have spent time on other processes. See the figure. CPU time is measured in clock ticks or seconds. Sometimes it is useful to convert CPU time into a percentage of the CPU capacity, giving the CPU usage. Measuring CPU time for two functionally identical programs that process identical inputs can indicate which program is faster, but it is a common misunderstanding that CPU time can be used to compare algorithms. Comparing programs by their CPU time compares specific implementations of algorithms. (It is possible to have both efficient and inefficient implementations of the same algorithm.) Algorithms are more commonly compared using measures of time complexity and space complexity. Typically, the CPU time used by a program is measured by the operating system, which schedules all of the work of the CPU. Modern multitasking operating systems run hundreds of processes. (A process is a running program.) Upon starting a process, the operating system records the time using an internal timer. When the process is suspended or terminated, the operating system again records the time. The total time that a process spent running is its CPU time, as shown in the figure. $ gcc nextPrimeNumber.c -o nextPrimeNumber -lm $ /usr/bin/time ./nextPrimeNumber 300000070034 Prime number greater than 300000070034 is 300000070043 0.01user 0.00system 0:00.01elapsed 100%CPU $ This process took a total of 0.02 seconds of CPU time (User + System). The reported System time is 0.00 seconds, indicating that the amount of System time used was less than the printed resolution of 0.01 seconds. Elapsed real time was 0.08 seconds. The following is the source code of the application nextPrimeNumber which was used in the above example. // nextPrimeNumber.c include include include int isPrimeNumber(unsigned long int n) { unsigned long int limit = ceil(sqrt(n)); for (int i = 2; i

References

No reference rows published for this article.

Cite this article

MLA

"CPU time." encyclopegia.org, 2026, https://encyclopegia.org/wiki/cpu-time. Accessed 24 November 2026.

Chicago

"CPU time." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/cpu-time.

APA

encyclopegia.org. (2026). CPU time. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/cpu-time

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ladies Central European Open

enwiki · references available

Guy Gabaldon

enwiki · references available

Dynasty Warriors Online

enwiki · references available

San Clemente High School (California)

enwiki · references available

Vinnie Paz

enwiki · references available

Darik Radio

enwiki · references available

Lacey's Farm Quarry

enwiki · references available

Westonzoyland Pumping Station Museum

enwiki · references available

List of Higurashi When They Cry soundtracks

enwiki · references available

Yuichi Takai

enwiki · references available

Cristián Castañeda

enwiki · references available

Kaskel

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1339242959 · 0.5 · snapshot enwiki-001339242959

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.