VOOZH about

URL: https://www.geeksforgeeks.org/python/python-time-perf_counter_ns-function/

⇱ Python time.perf_counter_ns() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python time.perf_counter_ns() Function

Last Updated : 5 Nov, 2021

Python time.perf_counter_ns() function gives the integer value of time in nanoseconds.

Syntax:

from time import perf_counter_ns

We can find the elapsed time by using start and stop functions. We can also find the elapsed time during the whole program by subtracting stoptime and starttime

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: