/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 1 6 . ĠSun gh you k ĠB ae Ġ< sun gh you k . bae @ gmail . com > Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcom . github . deb op . k od at imes . ranges . reactive Ċ Ċ import Ġcom . github . deb op . k od at imes . ranges . DateTime Progress ion Ċ import Ġcom . github . deb op . k od at imes . ranges . DateTime Range Ċ import Ġcom . github . deb op . k od at imes . ranges . Instant Progress ion Ċ import Ġcom . github . deb op . k od at imes . ranges . Instant Range Ċ import Ġio . reactivex . Flow able Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . Global Scope Ċ import Ġkotlinx . coroutines . rx 2 . rx Flow able Ċ import Ġorg . joda . time . DateTime Ċ import Ġorg . joda . time . Duration Ċ import Ġorg . joda . time . Instant Ċ import Ġkotlin . coroutines . Coroutine Context Ċ import Ġkotlin . coroutines . Empty Coroutine Context Ċ Ċ @ Experimental Cor outines Api Ċ @ Jvm Over loads Ċ suspend Ġfun ĠDateTime Progress ion . to Flow able ( context : ĠCor outine Context Ġ= ĠDispatch ers . Default ): ĠFlow able < DateTime > Ġ= ĊĠĠĠ ĠGlobal Scope . rx Flow able ( context ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis @ to Flow able . forEach Ġ{ Ġsend ( it ) Ġ} ĊĠĠĠ Ġ} Ċ Ċ @ Experimental Cor outines Api Ċ @ Jvm Over loads Ċ suspend Ġfun ĠInstant Progress ion . to Flow able ( coroutine Context : ĠCor outine Context Ġ= ĠEmpty Coroutine Context ): ĠFlow able < Instant > Ġ= ĊĠĠĠ ĠGlobal Scope . rx Flow able ( coroutine Context ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis @ to Flow able . forEach Ġ{ Ġsend ( it ) Ġ} ĊĠĠĠ Ġ} Ċ Ċ @ Experimental Cor outines Api Ċ @ Jvm Over loads Ċ suspend Ġfun ĠDateTime Range . to Flow able ( context : ĠCor outine Context Ġ= ĠDispatch ers . Default , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstep : ĠDuration Ġ= ĠDuration . millis ( 1 L )): ĠFlow able < DateTime > Ġ{ ĊĠĠĠ Ġreturn ĠDateTime Progress ion . from Closed Range ( start , Ġend Inclusive , Ġstep ). to Flow able ( context ) Ċ } Ċ Ċ @ Experimental Cor outines Api Ċ @ Jvm Over loads Ċ suspend Ġfun ĠInstant Range . to Flow able ( context : ĠCor outine Context Ġ= ĠDispatch ers . Default , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstep : ĠDuration Ġ= ĠDuration . millis ( 1 L )): ĠFlow able < Instant > Ġ{ ĊĠĠĠ Ġreturn ĠInstant Progress ion . from Closed Range ( start , Ġend Inclusive , Ġstep ). to Flow able ( context ) Ċ }