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: fastclock.go
    path of file: ./repos/k6/vendor/github.com/dlclark/regexp2
    
    the code of the file until where you have to start completion: package regexp2

import (
	"sync"
	"sync/atomic"

    
func extendClock(end fasttime) {
	fast.mu.Lock()
	defer fast.mu.Unlock()

	if fast.start.IsZero() {
		fast.start = time.Now()
	}

	// Extend the running time to cover end as well as a bit of slop.
	if shutdown := end + durationToTicks(time.Second); shutdown > fast.clockEnd.read() {
		fast.clockEnd.write(shutdown)
	}

	// Start clock if necessary
	if !fast.running {
		fast.running = true
		go runClock()
	}
}