From: Nicolas Peugnet <nicolas@club1.fr>
Date: Tue, 18 Feb 2025 11:52:21 +0100
Subject: Directly use time.Ticker to be able to use clockwork v0.1.x

Clockwork v0.4.0 provides a wrapper interface for time.Ticker, it is
used to swap the real-time clock with a fake one, but this ability is
not used in the tests that we run. Thus currently we simply patch
docker-compose to directly use time.Ticker, as we are not able to update
clockwork without breaking some other packages (e.g. etcd, that will use
clockwork v0.5.0 in its upcoming release).

Drop this patch once clockwork is updated to v0.4.0

Forwarded: not-needed
---
 pkg/compose/watch.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/compose/watch.go b/pkg/compose/watch.go
index cc9fba2..8065119 100644
--- a/pkg/compose/watch.go
+++ b/pkg/compose/watch.go
@@ -363,13 +363,13 @@ func batchDebounceEvents(ctx context.Context, clock clockwork.Clock, delay time.
 			seen = make(map[string]fileEvent)
 		}
 
-		t := clock.NewTicker(delay)
+		t := time.NewTicker(delay)
 		defer t.Stop()
 		for {
 			select {
 			case <-ctx.Done():
 				return
-			case <-t.Chan():
+			case <-t.C:
 				flushEvents()
 			case e, ok := <-input:
 				if !ok {
