Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for 1e9 (0.03 sec)

  1. src/time/time.go

    	default:
    		return -d
    	}
    }
    
    // Add returns the time t+d.
    func (t Time) Add(d Duration) Time {
    	dsec := int64(d / 1e9)
    	nsec := t.nsec() + int32(d%1e9)
    	if nsec >= 1e9 {
    		dsec++
    		nsec -= 1e9
    	} else if nsec < 0 {
    		dsec--
    		nsec += 1e9
    	}
    	t.wall = t.wall&^nsecMask | uint64(nsec) // update nsec
    	t.addSec(dsec)
    	if t.wall&hasMonotonic != 0 {
    		te := t.ext + int64(d)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
  2. src/time/time_test.go

    		}
    	}
    }
    
    func TestNanosecondsToUTC(t *testing.T) {
    	for _, test := range nanoutctests {
    		golden := &test.golden
    		nsec := test.seconds*1e9 + int64(golden.Nanosecond)
    		tm := Unix(0, nsec).UTC()
    		newnsec := tm.Unix()*1e9 + int64(tm.Nanosecond())
    		if newnsec != nsec {
    			t.Errorf("NanosecondsToUTC(%d).Nanoseconds() = %d", nsec, newnsec)
    		}
    		if !same(tm, golden) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  3. src/time/format.go

    	if t.wall&hasMonotonic != 0 {
    		m2 := uint64(t.ext)
    		sign := byte('+')
    		if t.ext < 0 {
    			sign = '-'
    			m2 = -m2
    		}
    		m1, m2 := m2/1e9, m2%1e9
    		m0, m1 := m1/1e9, m1%1e9
    		buf := make([]byte, 0, 24)
    		buf = append(buf, " m="...)
    		buf = append(buf, sign)
    		wid := 0
    		if m0 != 0 {
    			buf = appendInt(buf, int(m0), 0)
    			wid = 9
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  4. src/math/big/int_test.go

    	{-10, -10, "-10"},
    	{0, -1, "1"},                      // empty range
    	{-1, -100, "1"},                   // empty range
    	{-1, 1, "0"},                      // range includes 0
    	{-1e9, 0, "0"},                    // range includes 0
    	{-1e9, 1e9, "0"},                  // range includes 0
    	{-10, -1, "3628800"},              // 10!
    	{-20, -2, "-2432902008176640000"}, // -20!
    	{-99, -1,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  5. src/syscall/syscall_windows.go

    type Timespec struct {
    	Sec  int64
    	Nsec int64
    }
    
    func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
    
    func NsecToTimespec(nsec int64) (ts Timespec) {
    	ts.Sec = nsec / 1e9
    	ts.Nsec = nsec % 1e9
    	return
    }
    
    // TODO(brainman): fix all needed for net
    
    func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, EWINDOWS }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 11:49:46 UTC 2024
    - 52.7K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go

    type Timespec struct {
    	Sec  int64
    	Nsec int64
    }
    
    func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
    
    func NsecToTimespec(nsec int64) (ts Timespec) {
    	ts.Sec = nsec / 1e9
    	ts.Nsec = nsec % 1e9
    	return
    }
    
    // TODO(brainman): fix all needed for net
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 22:18:42 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		{"1E", decQuantity(1, 18, DecimalSI)},
    
    		// Decimal exponents
    		{"1E-3", decQuantity(1, -3, DecimalExponent)},
    		{"1e3", decQuantity(1, 3, DecimalExponent)},
    		{"1E6", decQuantity(1, 6, DecimalExponent)},
    		{"1e9", decQuantity(1, 9, DecimalExponent)},
    		{"1E12", decQuantity(1, 12, DecimalExponent)},
    		{"1e15", decQuantity(1, 15, DecimalExponent)},
    		{"1E18", decQuantity(1, 18, DecimalExponent)},
    
    		// Nonstandard but still parsable
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  8. cmd/test-utils_test.go

    	// Initial seed required, generate one.
    	if r == 0 {
    		r = reseed()
    	}
    	// constants from Numerical Recipes
    	r = r*1664525 + 1013904223
    	randN = r
    	randmu.Unlock()
    	return strconv.Itoa(int(1e9 + r%1e9))[1:]
    }
    
    // isSameType - compares two object types via reflect.TypeOf
    func isSameType(obj1, obj2 interface{}) bool {
    	return reflect.TypeOf(obj1) == reflect.TypeOf(obj2)
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  9. src/encoding/xml/marshal_test.go

    	{Value: &Plain{[3]int{1, 2, 3}}, ExpectXML: `<Plain><V>1</V><V>2</V><V>3</V></Plain>`},
    	{Value: ifaceptr(true), MarshalOnly: true, ExpectXML: `<bool>true</bool>`},
    
    	// Test time.
    	{
    		Value:     &Plain{time.Unix(1e9, 123456789).UTC()},
    		ExpectXML: `<Plain><V>2001-09-09T01:46:40.123456789Z</V></Plain>`,
    	},
    
    	// A pointer to struct{} may be used to test for an element's presence.
    	{
    		Value:     &PresenceTest{new(struct{})},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  10. src/runtime/mgcscavenge.go

    	// easier to reason about for tuning purposes.
    	s.sleepController = piController{
    		// Tuned loosely via Ziegler-Nichols process.
    		kp: 0.3375,
    		ti: 3.2e6,
    		tt: 1e9, // 1 second reset time.
    
    		// These ranges seem wide, but we want to give the controller plenty of
    		// room to hunt for the optimal value.
    		min: 0.001,  // 1:1000
    		max: 1000.0, // 1000:1
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:48:45 UTC 2024
    - 52.3K bytes
    - Viewed (0)
Back to top