Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for Settimeofday (0.23 sec)

  1. src/cmd/cgo/internal/testsanitizers/testdata/tsan9.go

    #include <stdlib.h>
    #include <sys/time.h>
    
    void spin() {
    	size_t n;
    	struct timeval tvstart, tvnow;
    	int diff;
    	void *prev = NULL, *cur;
    
    	gettimeofday(&tvstart, NULL);
    	for (n = 0; n < 1<<20; n++) {
    		cur = malloc(n);
    		free(prev);
    		prev = cur;
    
    		gettimeofday(&tvnow, NULL);
    		diff = (tvnow.tv_sec - tvstart.tv_sec) * 1000 * 1000 + (tvnow.tv_usec - tvstart.tv_usec);
    
    		// Profile frequency is 100Hz so we should definitely
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/syscall/asm_linux_amd64.s

    	MOVQ	a1+8(FP), DI
    	MOVQ	a2+16(FP), SI
    	MOVQ	a3+24(FP), DX
    	MOVQ	trap+0(FP), AX	// syscall entry
    	SYSCALL
    	MOVQ	AX, r1+32(FP)
    	MOVQ	DX, r2+40(FP)
    	RET
    
    // func gettimeofday(tv *Timeval) (err uintptr)
    TEXT ·gettimeofday(SB),NOSPLIT,$0-16
    	MOVQ	tv+0(FP), DI
    	MOVQ	$0, SI
    	MOVQ	runtime·vdsoGettimeofdaySym(SB), AX
    	TESTQ   AX, AX
    	JZ fallback
    	CALL	AX
    ret:
    	CMPQ	AX, $0xfffffffffffff001
    	JLS	ok7
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:11:15 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go

    //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
    
    func Gettimeofday(tv *Timeval) (err error) {
    	errno := gettimeofday(tv)
    	if errno != 0 {
    		return errno
    	}
    	return nil
    }
    
    func Time(t *Time_t) (tt Time_t, err error) {
    	var tv Timeval
    	errno := gettimeofday(&tv)
    	if errno != 0 {
    		return 0, errno
    	}
    	if t != nil {
    		*t = Time_t(tv.Sec)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build amd64 && linux && gc
    
    package unix
    
    import "syscall"
    
    //go:noescape
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 290 bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go

    //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
    //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
    
    //sysnb	Gettimeofday(tv *Timeval) (err error)
    
    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: Thu Oct 19 23:33:33 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go

    //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
    //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
    
    //sysnb	Gettimeofday(tv *Timeval) (err error)
    
    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: Thu Oct 19 23:33:33 UTC 2023
    - 6K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/asm_linux_amd64.s

    	MOVQ	a2+16(FP), SI
    	MOVQ	a3+24(FP), DX
    	MOVQ	$0, R10
    	MOVQ	$0, R8
    	MOVQ	$0, R9
    	MOVQ	trap+0(FP), AX	// syscall entry
    	SYSCALL
    	MOVQ	AX, r1+32(FP)
    	MOVQ	DX, r2+40(FP)
    	RET
    
    TEXT ·gettimeofday(SB),NOSPLIT,$0-16
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. src/syscall/syscall_test.go

    	}
    }
    
    func TestGettimeofday(t *testing.T) {
    	if runtime.GOOS == "js" {
    		t.Skip("not implemented on " + runtime.GOOS)
    	}
    	tv := &syscall.Timeval{}
    	if err := syscall.Gettimeofday(tv); err != nil {
    		t.Fatal(err)
    	}
    	if tv.Sec == 0 && tv.Usec == 0 {
    		t.Fatal("Sec and Usec both zero")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Mar 14 17:56:50 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go

    	return ENOSYS
    }
    
    func Iopl(level int) (err error) {
    	return ENOSYS
    }
    
    //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
    //sysnb	Gettimeofday(tv *Timeval) (err error)
    
    func Time(t *Time_t) (tt Time_t, err error) {
    	var tv Timeval
    	err = Gettimeofday(&tv)
    	if err != nil {
    		return 0, err
    	}
    	if t != nil {
    		*t = Time_t(tv.Sec)
    	}
    	return Time_t(tv.Sec), nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  10. src/syscall/syscall_linux_arm64.go

    	var ts *Timespec
    	if timeout != nil {
    		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
    	}
    	return pselect(nfd, r, w, e, ts, nil)
    }
    
    //sysnb	Gettimeofday(tv *Timeval) (err error)
    
    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: Tue Nov 21 22:23:07 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top