Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkTicker (0.17 sec)

  1. src/time/tick_test.go

    				}
    			case <-After(5 * Second):
    				t.Fatalf("failed to read work, iteration %d", i)
    			case <-done:
    				t.Fatal("timer expired")
    			}
    		}
    	}
    }
    func BenchmarkTicker(b *testing.B) {
    	benchmark(b, func(pb *testing.PB) {
    		ticker := NewTicker(Nanosecond)
    		for pb.Next() {
    			<-ticker.C
    		}
    		ticker.Stop()
    	})
    }
    
    func BenchmarkTickerReset(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:10:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
Back to top