On this page
  1. time.process_time
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

time.process_time

Prev: time.perf_counter_ns | Up: time | Next: time.process_time_ns
Rel: time.asctime, time.clock_getres, time.clock_gettime, time.clock_gettime_ns
Ref: docs.python.org — time.process_time
Tags: #public #python3 #stdlib #time


Import

import time
from time import process_time

Signature & Overview

time.process_time()

Process time for profiling: sum of the kernel and user-space CPU time.

Usage

import time

c0 = time.process_time()
_ = sum(i * i for i in range(5000))
assert time.process_time() >= c0

Gotchas

REPL Inspect

from time import process_time
help(process_time)

Linked from

Related notes