@@ -1070,7 +1070,7 @@ fun main() = runBlocking<Unit> {
1070
1070
// sampleStart
1071
1071
val nums = (1 .. 3 ).asFlow().onEach { delay(300 ) } // numbers 1..3 every 300 ms
1072
1072
val strs = flowOf(" one" , " two" , " three" ).onEach { delay(400 ) } // strings every 400 ms
1073
- val startTime = currentTimeMillis() // remember the start time
1073
+ val startTime = System . currentTimeMillis() // remember the start time
1074
1074
nums.combine(strs) { a, b -> " $a -> $b " } // compose a single string with "combine"
1075
1075
.collect { value -> // collect and print
1076
1076
println (" $value at ${System .currentTimeMillis() - startTime} ms from start" )
@@ -1152,7 +1152,7 @@ fun requestFlow(i: Int): Flow<String> = flow {
1152
1152
1153
1153
fun main () = runBlocking<Unit > {
1154
1154
// sampleStart
1155
- val startTime = currentTimeMillis() // remember the start time
1155
+ val startTime = System . currentTimeMillis() // remember the start time
1156
1156
(1 .. 3 ).asFlow().onEach { delay(100 ) } // a number every 100 ms
1157
1157
.flatMapConcat { requestFlow(it) }
1158
1158
.collect { value -> // collect and print
@@ -1201,7 +1201,7 @@ fun requestFlow(i: Int): Flow<String> = flow {
1201
1201
1202
1202
fun main () = runBlocking<Unit > {
1203
1203
// sampleStart
1204
- val startTime = currentTimeMillis() // remember the start time
1204
+ val startTime = System . currentTimeMillis() // remember the start time
1205
1205
(1 .. 3 ).asFlow().onEach { delay(100 ) } // a number every 100 ms
1206
1206
.flatMapMerge { requestFlow(it) }
1207
1207
.collect { value -> // collect and print
@@ -1253,7 +1253,7 @@ fun requestFlow(i: Int): Flow<String> = flow {
1253
1253
1254
1254
fun main () = runBlocking<Unit > {
1255
1255
// sampleStart
1256
- val startTime = currentTimeMillis() // remember the start time
1256
+ val startTime = System . currentTimeMillis() // remember the start time
1257
1257
(1 .. 3 ).asFlow().onEach { delay(100 ) } // a number every 100 ms
1258
1258
.flatMapLatest { requestFlow(it) }
1259
1259
.collect { value -> // collect and print
0 commit comments