Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for nowTicks (0.3 sec)

  1. src/runtime/runtime.go

    			return r
    		}
    
    		// Grab the current time in both clocks.
    		nowTime := nanotime()
    		nowTicks := cputicks()
    
    		// See if we can use these times.
    		if nowTicks > ticks.startTicks && nowTime-ticks.startTime > minTimeForTicksPerSecond {
    			// Perform the calculation with floats. We don't want to risk overflow.
    			r = int64(float64(nowTicks-ticks.startTicks) * 1e9 / float64(nowTime-ticks.startTime))
    			if r == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. src/runtime/mprof.go

    	gp := getg()
    
    	if lt.timeStart != 0 {
    		nowTime := nanotime()
    		gp.m.mLockProfile.waitTime.Add((nowTime - lt.timeStart) * lt.timeRate)
    	}
    
    	if lt.tickStart != 0 {
    		nowTick := cputicks()
    		gp.m.mLockProfile.recordLock(nowTick-lt.tickStart, lt.lock)
    	}
    }
    
    type mLockProfile struct {
    	waitTime   atomic.Int64 // total nanoseconds spent waiting in runtime.lockWithRank
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 53.3K bytes
    - Viewed (0)
Back to top