tailscale/tstime
Josh Bleecher Snyder 142670b8c2 tstime/mono: new package
Package mono provides a fast monotonic time.

Its primary advantage is that it is fast:
It is approximately twice as fast as time.Now.
This is because time.Now uses two clock calls,
one for wall time and one for monotonic time.

We ask for the current time 4-6 times per network packet.
At ~50ns per call to time.Now, that's enough to show
up in CPU profiles.

Package mono is a first step towards addressing that.
It is designed to be a near drop-in replacement for package time.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-07-29 12:56:58 -07:00
..
mono tstime/mono: new package 2021-07-29 12:56:58 -07:00
jitter.go tstime: add RandomDurationBetween helper 2021-01-21 07:54:14 -08:00
jitter_test.go tstime: add RandomDurationBetween helper 2021-01-21 07:54:14 -08:00
tstime.go tstime: add Parse3339B, for byte slices 2020-11-19 14:47:11 -08:00
tstime_test.go tstime: add Parse3339B, for byte slices 2020-11-19 14:47:11 -08:00