Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 445 for Time (0.34 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. utils/tests/utils.go

    		isEqual := func() {
    			if curTime, ok := got.(time.Time); ok {
    				format := "2006-01-02T15:04:05Z07:00"
    
    				if curTime.Round(time.Second).UTC().Format(format) != expect.(time.Time).Round(time.Second).UTC().Format(format) && curTime.Truncate(time.Second).UTC().Format(format) != expect.(time.Time).Truncate(time.Second).UTC().Format(format) {
    					t.Errorf("%v: expect: %v, got %v after time round", utils.FileWithLineNum(), expect.(time.Time), curTime)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. 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)
  6. istioctl/pkg/metrics/metrics_test.go

    	return nil, nil
    }
    
    func (client mockPromAPI) LabelNames(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]string, promv1.Warnings, error) {
    	return nil, nil, nil
    }
    
    func (client mockPromAPI) LabelValues(context.Context, string, []string, time.Time, time.Time) (prometheus_model.LabelValues, promv1.Warnings, error) {
    	return nil, nil, nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Oct 25 02:07:44 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top