aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/puddle/v2/nanotime_time.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/jackc/puddle/v2/nanotime_time.go')
-rw-r--r--vendor/github.com/jackc/puddle/v2/nanotime_time.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/jackc/puddle/v2/nanotime_time.go b/vendor/github.com/jackc/puddle/v2/nanotime_time.go
new file mode 100644
index 0000000..f8e7593
--- /dev/null
+++ b/vendor/github.com/jackc/puddle/v2/nanotime_time.go
@@ -0,0 +1,13 @@
+//go:build purego || appengine || js
+
+// This file contains the safe implementation of nanotime using time.Now().
+
+package puddle
+
+import (
+ "time"
+)
+
+func nanotime() int64 {
+ return time.Now().UnixNano()
+}