Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for Nsec (0.06 sec)

  1. src/syscall/timestruct.go

    func NsecToTimeval(nsec int64) Timeval {
    	nsec += 999 // round up to microsecond
    	usec := nsec % 1e9 / 1e3
    	sec := nsec / 1e9
    	if usec < 0 {
    		usec += 1e6
    		sec--
    	}
    	return setTimeval(sec, usec)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 958 bytes
    - Viewed (0)
  2. src/runtime/timestub.go

    //   - github.com/ulule/limiter/v3
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname time_now time.now
    func time_now() (sec int64, nsec int32, mono int64) {
    	sec, nsec = walltime()
    	return sec, nsec, nanotime()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 889 bytes
    - Viewed (0)
  3. src/syscall/syscall.go

    func (ts *Timespec) Unix() (sec int64, nsec int64) {
    	return int64(ts.Sec), int64(ts.Nsec)
    }
    
    // Unix returns the time stored in tv as seconds plus nanoseconds.
    func (tv *Timeval) Unix() (sec int64, nsec int64) {
    	return int64(tv.Sec), int64(tv.Usec) * 1000
    }
    
    // Nano returns the time stored in ts as nanoseconds.
    func (ts *Timespec) Nano() int64 {
    	return int64(ts.Sec)*1e9 + int64(ts.Nsec)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. src/syscall/syscall_wasip1.go

    }
    
    func (tv *Timeval) setTimestamp(t timestamp) {
    	tv.Sec = int64(t / 1e9)
    	tv.Usec = int64((t % 1e9) / 1e3)
    }
    
    func setTimespec(sec, nsec int64) Timespec {
    	return Timespec{Sec: sec, Nsec: nsec}
    }
    
    func setTimeval(sec, usec int64) Timeval {
    	return Timeval{Sec: sec, Usec: usec}
    }
    
    type clockid = uint32
    
    const (
    	clockRealtime clockid = iota
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. src/syscall/syscall_plan9.go

    	}
    
    	return Chdir(path)
    }
    
    type Timespec struct {
    	Sec  int32
    	Nsec int32
    }
    
    type Timeval struct {
    	Sec  int32
    	Usec int32
    }
    
    func NsecToTimeval(nsec int64) (tv Timeval) {
    	nsec += 999 // round up to microsecond
    	tv.Usec = int32(nsec % 1e9 / 1e3)
    	tv.Sec = int32(nsec / 1e9)
    	return
    }
    
    func nsec() int64 {
    	var scratch int64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. src/syscall/syscall_js.go

    }
    
    type Iovec struct{} // dummy
    
    type Timespec struct {
    	Sec  int64
    	Nsec int64
    }
    
    type Timeval struct {
    	Sec  int64
    	Usec int64
    }
    
    func setTimespec(sec, nsec int64) Timespec {
    	return Timespec{Sec: sec, Nsec: nsec}
    }
    
    func setTimeval(sec, usec int64) Timeval {
    	return Timeval{Sec: sec, Usec: usec}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  7. src/runtime/write_err_android.go

    	//   hdr[1:2] tid (uint16_t)
    	//   hdr[3:11] log_time defined in <log/log_read.h>
    	//      hdr[3:7] sec unsigned uint32, little endian.
    	//      hdr[7:11] nsec unsigned uint32, little endian.
    	hdr[0] = 0 // LOG_ID_MAIN
    	sec, nsec, _ := time_now()
    	packUint32(hdr[3:7], uint32(sec))
    	packUint32(hdr[7:11], uint32(nsec))
    
    	// TODO(hakim):  hdr[1:2] = gettid?
    
    	return 11 + len(writeHeader)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    }
    
    // DateMicro returns the MicroTime corresponding to the supplied parameters
    // by wrapping time.Date.
    func DateMicro(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) MicroTime {
    	return MicroTime{time.Date(year, month, day, hour, min, sec, nsec, loc)}
    }
    
    // NowMicro returns the current local time.
    func NowMicro() MicroTime {
    	return MicroTime{time.Now()}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. src/runtime/vdso_freebsd.go

    }
    
    func fallback_nanotime() int64
    func fallback_walltime() (sec int64, nsec int32)
    
    //go:nosplit
    func nanotime1() int64 {
    	bt := vdsoClockGettime(_CLOCK_MONOTONIC)
    	if bt == zeroBintime {
    		return fallback_nanotime()
    	}
    	return int64((1e9 * uint64(bt.sec)) + ((1e9 * uint64(bt.frac>>32)) >> 32))
    }
    
    func walltime() (sec int64, nsec int32) {
    	bt := vdsoClockGettime(_CLOCK_REALTIME)
    	if bt == zeroBintime {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    	return Time{time}
    }
    
    // Date returns the Time corresponding to the supplied parameters
    // by wrapping time.Date.
    func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time {
    	return Time{time.Date(year, month, day, hour, min, sec, nsec, loc)}
    }
    
    // Now returns the current local time.
    func Now() Time {
    	return Time{time.Now()}
    }
    
    // IsZero returns true if the value is nil or time is zero.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top