github.com/blend/go-sdk@v1.20220411.3/ratelimiter/main_test.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package ratelimiter 9 10 import ( 11 "time" 12 ) 13 14 // Clock is a helper function. 15 func Clock(t time.Time, offset time.Duration) func() time.Time { 16 return func() time.Time { 17 return t.Add(offset) 18 } 19 }