Created
January 20, 2022 12:41
-
-
Save max6363/46ee39af6c86038b1e8a57ab38a649d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import Foundation | |
import PlaygroundSupport | |
let subscription = Timer.publish(every: 1, on: .main, in: .common) | |
.autoconnect() | |
.sink { output in | |
print("finished stream with : \(output)") | |
} receiveValue: { value in | |
print("receive value: \(value)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment