Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TimespecToNsec (0.2 sec)

  1. src/syscall/timestruct.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix || (js && wasm) || wasip1
    
    package syscall
    
    // TimespecToNsec returns the time stored in ts as nanoseconds.
    func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
    
    // NsecToTimespec converts a number of nanoseconds into a [Timespec].
    func NsecToTimespec(nsec int64) Timespec {
    	sec := nsec / 1e9
    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/cmd/vendor/golang.org/x/sys/unix/timestruct.go

    // license that can be found in the LICENSE file.
    
    //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
    
    package unix
    
    import "time"
    
    // TimespecToNsec returns the time stored in ts as nanoseconds.
    func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
    
    // NsecToTimespec converts a number of nanoseconds into a Timespec.
    func NsecToTimespec(nsec int64) Timespec {
    	sec := nsec / 1e9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/syscall/syscall_bsd.go

    	if err != ENOSYS {
    		return err
    	}
    	// Not as efficient as it could be because Timespec and
    	// Timeval have different types in the different OSes
    	tv := [2]Timeval{
    		NsecToTimeval(TimespecToNsec(ts[0])),
    		NsecToTimeval(TimespecToNsec(ts[1])),
    	}
    	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
    }
    
    //sys	futimes(fd int, timeval *[2]Timeval) (err error)
    
    func Futimes(fd int, tv []Timeval) (err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 10:34:48 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/unix/syscall_bsd.go

    	if err != ENOSYS {
    		return err
    	}
    	// Not as efficient as it could be because Timespec and
    	// Timeval have different types in the different OSes
    	tv := [2]Timeval{
    		NsecToTimeval(TimespecToNsec(ts[0])),
    		NsecToTimeval(TimespecToNsec(ts[1])),
    	}
    	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
    }
    
    func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
    	if ts == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 15K bytes
    - Viewed (0)
  5. src/syscall/fs_wasip1.go

    	// UTIME_OMIT value must match internal/syscall/unix/at_wasip1.go
    	const UTIME_OMIT = -0x2
    	if path == "" {
    		return EINVAL
    	}
    	dirFd, pathPtr, pathLen := preparePath(path)
    	atime := TimespecToNsec(ts[0])
    	mtime := TimespecToNsec(ts[1])
    	if ts[0].Nsec == UTIME_OMIT || ts[1].Nsec == UTIME_OMIT {
    		var st Stat_t
    		if err := Stat(path, &st); err != nil {
    			return err
    		}
    		if ts[0].Nsec == UTIME_OMIT {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  6. src/syscall/syscall_windows.go

    	if e != nil {
    		return e
    	}
    	defer Close(h)
    	a := Filetime{}
    	w := Filetime{}
    	if ts[0].Nsec != _UTIME_OMIT {
    		a = NsecToFiletime(TimespecToNsec(ts[0]))
    	}
    	if ts[1].Nsec != _UTIME_OMIT {
    		w = NsecToFiletime(TimespecToNsec(ts[1]))
    	}
    	return SetFileTime(h, nil, &a, &w)
    }
    
    func Fsync(fd Handle) (err error) {
    	return FlushFileBuffers(fd)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 11:49:46 UTC 2024
    - 52.7K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go

    		return EINVAL
    	}
    	// Not as efficient as it could be because Timespec and
    	// Timeval have different types in the different OSes
    	tv := [2]Timeval{
    		NsecToTimeval(TimespecToNsec(ts[0])),
    		NsecToTimeval(TimespecToNsec(ts[1])),
    	}
    	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
    }
    
    // End UtimesNano
    
    // Begin UtimesNanoAt
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 84.4K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go

    		FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
    		OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
    	if e != nil {
    		return e
    	}
    	defer CloseHandle(h)
    	a := NsecToFiletime(TimespecToNsec(ts[0]))
    	w := NsecToFiletime(TimespecToNsec(ts[1]))
    	return SetFileTime(h, nil, &a, &w)
    }
    
    func Fsync(fd Handle) (err error) {
    	return FlushFileBuffers(fd)
    }
    
    func Chmod(path string, mode uint32) (err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 22:18:42 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg syscall (darwin-386), func Sysctl(string) (string, error)
    pkg syscall (darwin-386), func SysctlUint32(string) (uint32, error)
    pkg syscall (darwin-386), func TimespecToNsec(Timespec) int64
    pkg syscall (darwin-386), func TimevalToNsec(Timeval) int64
    pkg syscall (darwin-386), func Truncate(string, int64) error
    pkg syscall (darwin-386), func Umask(int) int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Time", Func, 0},
    		{"Time_t", Type, 0},
    		{"Times", Func, 0},
    		{"Timespec", Type, 0},
    		{"Timespec.Nsec", Field, 0},
    		{"Timespec.Pad_cgo_0", Field, 2},
    		{"Timespec.Sec", Field, 0},
    		{"TimespecToNsec", Func, 0},
    		{"Timeval", Type, 0},
    		{"Timeval.Pad_cgo_0", Field, 0},
    		{"Timeval.Sec", Field, 0},
    		{"Timeval.Usec", Field, 0},
    		{"Timeval32", Type, 0},
    		{"Timeval32.Sec", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top