Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
testing_other.go32 linesDownload Raw Back to testing
1// Copyright 2021 The Go Authors. All rights reserved.2// Use of this source code is governed by a BSD-style3// license that can be found in the LICENSE file.4 5//go:build !windows6 7package testing8 9import "time"10 11// isWindowsRetryable reports whether err is a Windows error code12// that may be fixed by retrying a failed filesystem operation.13func isWindowsRetryable(err error) bool {14	return false15}16 17// highPrecisionTime represents a single point in time.18// On all systems except Windows, using time.Time is fine.19type highPrecisionTime struct {20	now time.Time21}22 23// highPrecisionTimeNow returns high precision time for benchmarking.24func highPrecisionTimeNow() highPrecisionTime {25	return highPrecisionTime{now: time.Now()}26}27 28// highPrecisionTimeSince returns duration since b.29func highPrecisionTimeSince(b highPrecisionTime) time.Duration {30	return time.Since(b.now)31}32 
codekingpro/portable-devtools · Team Ai