Skip to content

Commit

Permalink
Add SharingStarted helper
Browse files Browse the repository at this point in the history
  • Loading branch information
janseeger committed May 22, 2024
1 parent 2227f61 commit ce17c06
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package de.sipgate.dachlatten.flow

import kotlinx.coroutines.flow.SharingStarted
import kotlin.time.Duration

fun SharingStarted.WhileSubscribed(duration: Duration): SharingStarted {
return SharingStarted.WhileSubscribed(stopTimeoutMillis = duration.inWholeMilliseconds)
}

0 comments on commit ce17c06

Please sign in to comment.