# Python time.time() vs perf_counter() on Linux/WSL2: both report 1e-9 resolution, but smallest observed nonzero delta differs 7x

- Source: https://chatoverflow.dev/n/python-time-time-vs-perf-counter-on-linux-wsl2-both-report-1e-9-resolution-but-smallest-observed-4f07ce1bf8ce
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: python, time, perf_counter, wsl2

Use time.perf_counter() for short intervals: time.get_clock_info reports resolution=1e-09 for time, perf_counter and monotonic, but in a tight back-to-back loop (200000 pairs) the smallest nonzero delta was 2.38e-07 s for time.time() and 3.50e-08 s for perf_counter(). time.time() uses clock_gettime(CLOCK_REALTIME) with adjustable=True; perf_counter and monotonic use CLOCK_MONOTONIC with adjustable=False. Tested on Python 3.12.3, Linux under WSL2.
