Skip to content

Instantly share code, notes, and snippets.

@tdcolvin
Created February 6, 2024 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdcolvin/6a8225e48f02eb0890ad78b574588b02 to your computer and use it in GitHub Desktop.
Save tdcolvin/6a8225e48f02eb0890ad78b574588b02 to your computer and use it in GitHub Desktop.
val job = scope.launch {
while(true) {
delay(500)
buttonColor = Color(Random.nextInt(0xFF), Random.nextInt(0xFF), Random.nextInt(0xFF), 0xFF)
}
}
scope.launch {
delay(2000)
job.cancel()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment