github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/operation/timeout.go (about)

     1  package operation
     2  
     3  import (
     4  	"time"
     5  
     6  	"google.golang.org/protobuf/types/known/durationpb"
     7  )
     8  
     9  func timeoutParam(d time.Duration) *durationpb.Duration {
    10  	if d > 0 {
    11  		return durationpb.New(d)
    12  	}
    13  
    14  	return nil
    15  }