Skip to content

Commit d02f440

Browse files
committed
Add comment about default elapsed time being zero
1 parent 1804776 commit d02f440

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

firebase-sessions/src/test/kotlin/com/google/firebase/sessions/testing/FakeTimeProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ import com.google.firebase.sessions.testing.TestSessionEventData.TEST_SESSION_TI
2121
import kotlin.time.Duration
2222
import kotlin.time.DurationUnit
2323

24-
/** Fake [TimeProvider] that allows programmatically elapsing time forward. */
24+
/**
25+
* Fake [TimeProvider] that allows programmatically elapsing time forward.
26+
*
27+
* Default [elapsedRealtime] is [Duration.ZERO] until the time is moved using [addInterval].
28+
*/
2529
class FakeTimeProvider(private val initialTimeUs: Long = TEST_SESSION_TIMESTAMP_US) : TimeProvider {
2630
private var elapsed = Duration.ZERO
2731

0 commit comments

Comments
 (0)