github.com/jackc/puddle/v2@v2.2.2-0.20240301145809-72b022bcfc59/nanotime_time.go (about)

     1  //go:build purego || appengine || js
     2  
     3  // This file contains the safe implementation of nanotime using time.Now().
     4  
     5  package puddle
     6  
     7  import (
     8  	"time"
     9  )
    10  
    11  func nanotime() int64 {
    12  	return time.Now().UnixNano()
    13  }