import Foundation class IntervalUpdater : ObservableObject { @Published var seed = 0 init(_ interval: TimeInterval) { Timer.scheduledTimer(withTimeInterval: interval, repeats: true) { [weak self] _ in self?.seed += 1 } } }