You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: throttle.go
    path of file: ./repos/gitkube/vendor/golang.org/x/tools/godoc/util
    
    the code of the file until where you have to start completion: // Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package util

import "
    
func (p *Throttle) Throttle() {
	if p.f < 0 {
		select {} // always sleep
	}

	t0 := time.Now()
	if t0.Before(p.tt) {
		return // keep running (minimum time slice not exhausted yet)
	}

	// accumulate running time
	p.tr += t0.Sub(p.tt) + p.dt

	// compute sleep time
	// Over time we want:
	//
	//	tr/ts = r/(1-r)
	//
	// Thus:
	//
	//	ts = tr*f with f = (1-r)/r
	//
	// After some incremental run time δr added to the total run time
	// tr, the incremental sleep-time δs to get to the same ratio again
	// after waking up from time.Sleep is:
	if δs := time.Duration(float64(p.tr)*p.f) - p.ts; δs > 0 {
		time.Sleep(δs)
	}

	// accumulate (actual) sleep time
	t1 := time.Now()
	p.ts += t1.Sub(t0)

	// set earliest next throttle time
	p.tt = t1.Add(p.dt)
}