Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for highPrecisionTimeSince (0.26 sec)

  1. src/testing/testing_windows.go

    	quo, _ := bits.Div64(hi, lo, uint64(queryPerformanceFrequency))
    	return time.Duration(quo)
    }
    
    var queryPerformanceFrequency int64
    
    // highPrecisionTimeSince returns duration since a.
    func highPrecisionTimeSince(a highPrecisionTime) time.Duration {
    	return highPrecisionTimeNow().sub(a)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. src/testing/testing_other.go

    }
    
    // highPrecisionTimeNow returns high precision time for benchmarking.
    func highPrecisionTimeNow() highPrecisionTime {
    	return highPrecisionTime{now: time.Now()}
    }
    
    // highPrecisionTimeSince returns duration since b.
    func highPrecisionTimeSince(b highPrecisionTime) time.Duration {
    	return time.Since(b.now)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Apr 27 19:42:36 UTC 2024
    - 876 bytes
    - Viewed (0)
  3. src/testing/fuzz.go

    				root.mu.Lock()
    				root.duration += highPrecisionTimeSince(root.start)
    				d := root.duration
    				root.mu.Unlock()
    				root.flushToParent(root.name, "--- FAIL: %s (%s)\n", root.name, fmtDuration(d))
    			}
    			didPanic = true
    			panic(err)
    		}
    		if err != nil {
    			doPanic(err)
    		}
    
    		// No panic or inappropriate Goexit.
    		f.duration += highPrecisionTimeSince(f.start)
    
    		if len(f.sub) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  4. src/testing/benchmark.go

    // StopTimer stops timing a test. This can be used to pause the timer
    // while performing complex initialization that you don't
    // want to measure.
    func (b *B) StopTimer() {
    	if b.timerOn {
    		b.duration += highPrecisionTimeSince(b.start)
    		runtime.ReadMemStats(&memStats)
    		b.netAllocs += memStats.Mallocs - b.startAllocs
    		b.netBytes += memStats.TotalAlloc - b.startBytes
    		b.timerOn = false
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  5. src/testing/testing.go

    		return
    	}
    
    	// We don't want to include the time we spend waiting for serial tests
    	// in the test duration. Record the elapsed time thus far and reset the
    	// timer afterwards.
    	t.duration += highPrecisionTimeSince(t.start)
    
    	// Add to the list of tests to be released by the parent.
    	t.parent.sub = append(t.parent.sub, t)
    
    	// Report any races during execution of this test up to this point.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
Back to top