Kotlin Coroutines and Delay
setTimeout with a delay. The
setTimeout code never makes it to production, but it does help me to understand if my code is the problem or if there's a timing conflict.
In working with Kotlin on Android, I've needed to employ the same technique. Kotlin obviously doesn't have a
setTimeout, but it does have coroutines to achieve approximately the same effect.
To run an async coroutine with delay, you can use the following Kotlin code:
// Create an async coroutine
// Execute code to test functionality
The coroutine becomes async and the delay can be whatever amount of milliseconds you'd like!
My trip to Mozilla Summit 2013 was incredible. I've spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out. MozSummit provided the perfect reminder of how brilliant my colleagues are and how much...
I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
I wrote a post titled Get Slick with MooTools Kwicks ages ago. The post was quite popular and the effect has been used often. Looking back now, the original code doesn't look as clean as it could. I've revised the original...