Created
April 18, 2021 20:15
-
-
Save Skyyo/d7e251879ef4c6693d0a6d578b6e6c39 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
private fun provideCurrencyUpdateFlow(): Flow<Int> { | |
return flow { | |
repeat(10000) { | |
delay(Random.nextLong(500L, 2500L)) | |
emit(Random.nextInt(0, 100)) | |
} | |
}.flowOn(Dispatchers.Default).distinctUntilChanged() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment