tailscale/tstime
Brad Fitzpatrick a1b8d703d6 tstime/mono: remove unsafe
This removes the unsafe/linkname and only uses the standard library.

It's a bit slower, for now, but https://go.dev/cl/518336 should get us
back.

On darwin/arm64, without https://go.dev/cl/518336

    pkg: tailscale.com/tstime/mono
              │   before    │                after                │
              │   sec/op    │   sec/op     vs base                │
    MonoNow-8   16.20n ± 0%   19.75n ± 0%  +21.92% (p=0.000 n=10)
    TimeNow-8   39.46n ± 0%   39.40n ± 0%   -0.16% (p=0.002 n=10)
    geomean     25.28n        27.89n       +10.33%

And with it,

    MonoNow-8   16.34n ±  1%   16.93n ± 0%  +3.67% (p=0.001 n=10)
    TimeNow-8   39.55n ± 15%   38.46n ± 1%  -2.76% (p=0.000 n=10)
    geomean     25.42n         25.52n       +0.41%

Updates #8839
Updates tailscale/go#70

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-11 13:23:16 -07:00
..
mono tstime/mono: remove unsafe 2023-08-11 13:23:16 -07:00
rate tstime/rate: add Value (#7491) 2023-03-09 11:13:09 -08:00
jitter_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
jitter.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tstime_test.go tstime: rely on stdlib parse functionality (#7482) 2023-03-06 18:05:51 -08:00
tstime.go tstime: add Since method (#8622) 2023-07-14 16:50:17 -04:00