diff options
author | 2024-09-16 09:26:41 +0200 | |
---|---|---|
committer | 2024-09-16 09:26:41 +0200 | |
commit | ca729aa4a06b5d7e5587e2b2e2a0b87bfb17513c (patch) | |
tree | 15147a61f3a12edba73c2add3aabf620b49c5d36 /vendor/github.com/jackc/puddle/v2/nanotime.go | |
parent | [bugfix] Hoist filterable text field extraction out of loop (#3297) (diff) | |
download | gotosocial-ca729aa4a06b5d7e5587e2b2e2a0b87bfb17513c.tar.xz |
[chore]: Bump github.com/jackc/pgx/v5 from 5.6.0 to 5.7.1 (#3302)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.6.0 to 5.7.1.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.6.0...v5.7.1)
---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/jackc/puddle/v2/nanotime.go')
-rw-r--r-- | vendor/github.com/jackc/puddle/v2/nanotime.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/jackc/puddle/v2/nanotime.go b/vendor/github.com/jackc/puddle/v2/nanotime.go new file mode 100644 index 000000000..8a5351a0d --- /dev/null +++ b/vendor/github.com/jackc/puddle/v2/nanotime.go @@ -0,0 +1,16 @@ +package puddle + +import "time" + +// nanotime returns the time in nanoseconds since process start. +// +// This approach, described at +// https://github.com/golang/go/issues/61765#issuecomment-1672090302, +// is fast, monotonic, and portable, and avoids the previous +// dependence on runtime.nanotime using the (unsafe) linkname hack. +// In particular, time.Since does less work than time.Now. +func nanotime() int64 { + return time.Since(globalStart).Nanoseconds() +} + +var globalStart = time.Now() |