On this page
time.process_time_ns
Prev: time.process_time | Up: time | Next: time.sleep
Rel: time.asctime, time.clock_getres, time.clock_gettime, time.clock_gettime_ns
Ref: docs.python.org — time.process_time_ns
Tags: #public #python3 #stdlib #time
Import
import time
from time import process_time_ns
Signature & Overview
time.process_time_ns()
Process time for profiling as nanoseconds: sum of the kernel and user-space CPU time.
Usage
import time
c0 = time.process_time_ns()
assert isinstance(time.process_time_ns() - c0, int)
Gotchas
- Nanosecond
intCPU timer: Does not advance while blocked on I/O or sleeping.
REPL Inspect
from time import process_time_ns
help(process_time_ns)
Linked from
Related notes
- tuts/python3/stdlib_module/time/process_time Linked here; links to this page; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/sleep Linked here; links to this page; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/asctime Linked here; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/clock_getres Linked here; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/clock_gettime Linked here; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/clock_gettime_ns Linked here; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time/time Linked here; shared tags: #stdlib, #time
- tuts/python3/stdlib_module/time links to this page; shared tags: #stdlib
- tuts/c/stdlib/time shared tags: #stdlib, #time
- tuts/c/stdlib/time/asctime shared tags: #stdlib, #time