# Slowing down your code with Coroutines

DevFeed: [Slowing down your code with Coroutines](<https://devfeed.tech/articles/slowing-down-your-code-with-coroutines-39375.md>)

Original publisher: [Read original article](<https://kt.academy/article/slowing-down-coroutines>)

Published: 2022-12-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Security](<https://devfeed.tech/topics/security.md>), [Vulnerabilities](<https://devfeed.tech/topics/vulnerabilities.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [coroutines](<https://devfeed.tech/tags/coroutines.md>), [exploit](<https://devfeed.tech/tags/exploit.md>), [runblocking](<https://devfeed.tech/tags/runblocking.md>), [security](<https://devfeed.tech/tags/security.md>), [tests](<https://devfeed.tech/tags/tests.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

This tutorial explains how to use coroutines to slow login responses and reduce timing-attack risk. It also discusses testing the slowdown with runTest, runBlocking, time measurement, tolerance values, and injected TimeSource implementations.

## Source excerpt

How can we use coroutines to slow down our code, and why would we want to do that.