Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestGcLastTime (0.23 sec)

  1. src/runtime/gc_test.go

    		p.nexty = head
    		p.p = new(int)
    		*p.p = 42
    		head = p
    		runtime.GC()
    	}
    	for p := head; p != nil; p = p.nexty {
    		if *p.p != 42 {
    			t.Fatal("corrupted heap")
    		}
    	}
    }
    
    func TestGcLastTime(t *testing.T) {
    	ms := new(runtime.MemStats)
    	t0 := time.Now().UnixNano()
    	runtime.GC()
    	t1 := time.Now().UnixNano()
    	runtime.ReadMemStats(ms)
    	last := int64(ms.LastGC)
    	if t0 > last || last > t1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top