- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,435 for Time (0.02 sec)
-
internal/config/drive/drive.go
if d == "" { cfg.MaxTimeout = 30 * time.Second } else { dur, _ := time.ParseDuration(d) if dur < time.Second { cfg.MaxTimeout = 30 * time.Second } else { cfg.MaxTimeout = getMaxTimeout(dur) } } return cfg, err } func getMaxTimeout(t time.Duration) time.Duration { if t > time.Second { return t } // get default value
Registered: 2025-05-25 19:28 - Last Modified: 2024-11-11 14:51 - 3K bytes - Viewed (0) -
internal/amztime/parse.go
// extension for http.TimeFormat - return time might be zero // if the timeStr is invalid. func ParseHeader(timeStr string) (time.Time, error) { for _, dateFormat := range httpTimeFormats { t, err := time.Parse(dateFormat, timeStr) if err == nil { return t, nil } } return time.Time{}, ErrMalformedDate } // ParseReplicationTS parse http.TimeFormat first // will try time.RFC3339Nano when parse http.TimeFormat failed
Registered: 2025-05-25 19:28 - Last Modified: 2024-01-18 07:03 - 2.5K bytes - Viewed (0) -
tests/non_std_test.go
package tests_test import ( "testing" "time" ) type Animal struct { Counter uint64 `gorm:"primary_key:yes"` Name string `gorm:"DEFAULT:'galeone'"` From string // test reserved sql keyword as field name Age *time.Time unexported string // unexported value CreatedAt time.Time UpdatedAt time.Time } func TestNonStdPrimaryKeyAndDefaultValues(t *testing.T) { DB.Migrator().DropTable(&Animal{})
Registered: 2025-05-25 09:35 - Last Modified: 2024-05-08 04:07 - 1.9K bytes - Viewed (0) -
cmd/update-notifier_test.go
{-72 * time.Hour, "another_update_url", ""}, {0, "another_update_url", ""}, {time.Hour, "", ""}, {0 * time.Second, "my_download_url", "now"}, {1 * time.Second, "my_download_url", "1 second before the latest release"}, {37 * time.Second, "my_download_url", "37 seconds before the latest release"}, {60 * time.Second, "my_download_url", "1 minute before the latest release"},
Registered: 2025-05-25 19:28 - Last Modified: 2023-07-31 15:36 - 4.1K bytes - Viewed (0) -
cmd/erasure-healing-common.go
if count > maxima { maxima = count latest = etag } } // Return the collected common max time, with maxima return latest, maxima } // commonTime returns a maximally occurring time from a list of time. func commonTimeAndOccurrence(times []time.Time, group time.Duration) (maxTime time.Time, maxima int) { timeOccurrenceMap := make(map[int64]int, len(times)) groupNano := group.Nanoseconds()
Registered: 2025-05-25 19:28 - Last Modified: 2025-03-30 00:56 - 12K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
if !lrwm.GetRLock(ctx, "", "object1", time.Second) { panic("Failed to acquire read lock") } // fmt.Println("2nd read lock acquired, waiting...") go func() { time.Sleep(2 * time.Second) lrwm.RUnlock() // fmt.Println("1st read lock released, waiting...") }() go func() { time.Sleep(3 * time.Second) lrwm.RUnlock() // fmt.Println("2nd read lock released, waiting...") }()
Registered: 2025-05-25 19:28 - Last Modified: 2025-04-09 14:28 - 7.8K bytes - Viewed (0) -
internal/amztime/iso8601_time_test.go
package amztime import ( "testing" "time" ) func TestISO8601Format(t *testing.T) { testCases := []struct { date time.Time expectedOutput string }{ { date: time.Date(2009, time.November, 13, 4, 51, 1, 940303531, time.UTC), expectedOutput: "2009-11-13T04:51:01.940Z", }, { date: time.Date(2009, time.November, 13, 4, 51, 1, 901303531, time.UTC),
Registered: 2025-05-25 19:28 - Last Modified: 2022-12-12 18:28 - 1.8K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle.go
if days == 0 { return modTime } t := modTime.UTC().Add(time.Duration(days+1) * 24 * time.Hour) return t.Truncate(24 * time.Hour) } // SetPredictionHeaders sets time to expiry and transition headers on w for a // given obj. func (lc Lifecycle) SetPredictionHeaders(w http.ResponseWriter, obj ObjectOpts) { event := lc.eval(obj, time.Time{}, 0) switch event.Action {
Registered: 2025-05-25 19:28 - Last Modified: 2025-04-03 06:45 - 18.2K bytes - Viewed (0) -
cmd/dynamic-timeouts.go
type dynamicTimeout struct { timeout int64 minimum int64 entries int64 log [dynamicTimeoutLogSize]time.Duration mutex sync.Mutex retryInterval time.Duration } type dynamicTimeoutOpts struct { timeout time.Duration minimum time.Duration retryInterval time.Duration } func newDynamicTimeoutWithOpts(opts dynamicTimeoutOpts) *dynamicTimeout {
Registered: 2025-05-25 19:28 - Last Modified: 2025-02-18 16:25 - 4.5K bytes - Viewed (0) -
internal/grid/benchmark_test.go
defer timeout(60 * time.Second)() ctx, cancel := context.WithTimeout(b.Context(), 30*time.Second) defer cancel() b.ReportAllocs() b.ResetTimer() t := time.Now() var ops int64 var lat int64 b.SetParallelism(par) b.RunParallel(func(pb *testing.PB) { rng := rand.New(rand.NewSource(time.Now().UnixNano())) n := 0 var latency int64
Registered: 2025-05-25 19:28 - Last Modified: 2025-04-09 14:28 - 15.6K bytes - Viewed (0)