(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func TestMultipleTimouts(t *testing.T) { |
| 58 | start := time.Now() |
| 59 | var timers []*Timer |
| 60 | |
| 61 | for i := 0; i < 1000; i++ { |
| 62 | timers = append(timers, NewTimer(time.Second)) |
| 63 | } |
| 64 | |
| 65 | // Wait for them all to expire. |
| 66 | for _, timer := range timers { |
| 67 | <-timer.C |
| 68 | } |
| 69 | |
| 70 | if int(time.Since(start).Seconds()) != 1 { |
| 71 | t.Errorf("took ~%v seconds, should be ~1 seconds\n", int(time.Since(start).Seconds())) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | func TestMultipleDifferentTimouts(t *testing.T) { |
| 76 | start := time.Now() |
nothing calls this directly
no test coverage detected
searching dependent graphs…