package reportbuf import "time" // Flush writes the buffered reports to a file now, as the periodic // flush does, so tests need not wait a minute for it. func (b *Buffer) Flush() error { return b.flushLocked() } // StopClock makes every report file the buffer writes from now on // carry the timestamp at, as if all were written in one millisecond. func (b *Buffer) StopClock(at time.Time) { b.now = func() time.Time { return at } }