Use time.Since to calculate elapsed time from a past moment and time.Until to calculate remaining time until a future deadline.
Use time.Since to measure elapsed time since a past moment and time.Until to measure time remaining until a future moment. Both functions return a time.Duration representing the difference between the provided timestamp and the current wall clock time.
start := time.Now()
// ... do work ...
elapsed := time.Since(start)
deadline := time.Now().Add(5 * time.Minute)
// ... wait ...
remaining := time.Until(deadline)
Think of time.Since as looking back at a stopwatch to see how long something took, and time.Until as looking at a countdown timer to see how much time is left. You use Since when you need to log performance or track duration, and Until when you need to check if a deadline has passed or how long to wait.