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

time.thread_time_ns

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


Import

import time
from time import thread_time_ns

Signature & Overview

time.thread_time_ns()

Thread time for profiling as nanoseconds: sum of the kernel and user-space CPU time.

Usage

import time

t0 = time.thread_time_ns()
assert isinstance(time.thread_time_ns() - t0, int)

Gotchas

REPL Inspect

from time import thread_time_ns
help(thread_time_ns)

Linked from

Related notes