Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 392 for Time (0.22 sec)

  1. internal/amztime/iso8601_time.go

    }
    
    // ISO8601Parse parses ISO8601 date string
    func ISO8601Parse(iso8601 string) (t time.Time, err error) {
    	for _, layout := range []string{
    		iso8601TimeFormat,
    		iso8601TimeFormatLong,
    		time.RFC3339,
    	} {
    		t, err = time.Parse(layout, iso8601)
    		if err == nil {
    			return t, nil
    		}
    	}
    
    	return t, err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 16 23:38:33 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. 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),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Dec 12 18:28:30 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  3. cmd/os-instrumented.go

    }
    
    // time an os action.
    func (o *osMetrics) time(s osMetric) func() {
    	startTime := time.Now()
    	return func() {
    		duration := time.Since(startTime)
    
    		atomic.AddUint64(&o.operations[s], 1)
    		o.latency[s].add(duration)
    	}
    }
    
    // incTime will increment time on metric s with a specific duration.
    func (o *osMetrics) incTime(s osMetric, d time.Duration) {
    	atomic.AddUint64(&o.operations[s], 1)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 15 01:09:38 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  4. internal/s3select/parquet/reader.go

    				var duration time.Duration
    				// Only support UTC normalized timestamps.
    				if ts.IsAdjustedToUTC {
    					switch {
    					case ts.Unit.IsSetNANOS():
    						duration = time.Duration(val) * time.Nanosecond
    					case ts.Unit.IsSetMILLIS():
    						duration = time.Duration(val) * time.Millisecond
    					case ts.Unit.IsSetMICROS():
    						duration = time.Duration(val) * time.Microsecond
    					default:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  5. cmd/license-update.go

    		for {
    			licenceUpdaterLoop(ctx, objAPI)
    
    			// license update stopped for some reason.
    			// sleep for some time and try again.
    			duration := time.Duration(r.Float64() * float64(time.Hour))
    			if duration < time.Second {
    				// Make sure to sleep at least a second to avoid high CPU ticks.
    				duration = time.Second
    			}
    			time.Sleep(duration)
    		}
    	}()
    }
    
    func licenceUpdaterLoop(ctx context.Context, objAPI ObjectLayer) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  6. cmd/update.go

    	return time.Parse(time.RFC3339, version)
    }
    
    // releaseTimeToReleaseTag - converts a time to a string formatted as
    // an official MinIO release tag.
    //
    // An official minio release tag looks like:
    // `RELEASE.2017-09-29T19-16-56Z`
    func releaseTimeToReleaseTag(releaseTime time.Time) string {
    	return "RELEASE." + releaseTime.Format(MinioReleaseTagTimeLayout)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  7. buildscripts/gen-ldflags.go

    }
    
    func commitTime() time.Time {
    	// git log --format=%cD -n1
    	var (
    		commitUnix []byte
    		err        error
    	)
    	cmdName := "git"
    	cmdArgs := []string{"log", "--format=%cI", "-n1"}
    	if commitUnix, err = exec.Command(cmdName, cmdArgs...).Output(); err != nil {
    		fmt.Fprintln(os.Stderr, "Error generating git commit-time: ", err)
    		os.Exit(1)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jun 16 23:10:48 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  8. internal/dsync/utils.go

    package dsync
    
    import (
    	"math/rand"
    	"time"
    )
    
    func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    	return func(r *rand.Rand, attempt uint) time.Duration {
    		sleep := min
    		sleep += unit * time.Duration(attempt)
    		if sleep > cap {
    			sleep = cap
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 13 15:42:21 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  9. cmd/xl-storage-disk-id-check.go

    		}
    
    		// Offset checks a bit.
    		time.Sleep(time.Duration(rng.Int63n(int64(1 * time.Second))))
    
    		dctx, dcancel := context.WithCancel(ctx)
    		started := time.Now()
    		go func() {
    			timeout := time.NewTimer(globalDriveConfig.GetMaxTimeout())
    			select {
    			case <-dctx.Done():
    				if !timeout.Stop() {
    					<-timeout.C
    				}
    			case <-timeout.C:
    				spent := time.Since(started)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  10. cmd/tier-last-day-stats.go

    }
    
    // forwardTo moves time to t, clearing entries between last update and t.
    func (l *lastDayTierStats) forwardTo(t time.Time) {
    	if t.IsZero() {
    		t = time.Now()
    	}
    
    	since := t.Sub(l.UpdatedAt).Hours()
    	// within the hour since l.UpdatedAt
    	if since < 1 {
    		return
    	}
    
    	idx, lastIdx := t.Hour(), l.UpdatedAt.Hour()
    
    	l.UpdatedAt = t // update to the latest time index
    
    	if since >= 24 {
    		l.Bins = [24]tierStats{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top