diff --git a/.idea/StructuredIO.iml b/.idea/StructuredIO.iml
index ce769e3..ad47194 100644
--- a/.idea/StructuredIO.iml
+++ b/.idea/StructuredIO.iml
@@ -5,7 +5,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 00cc026..806b876 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/structio/core/kernels/fifo.py b/structio/core/kernels/fifo.py
index 251aa1a..1857367 100644
--- a/structio/core/kernels/fifo.py
+++ b/structio/core/kernels/fifo.py
@@ -189,7 +189,7 @@ class FIFOKernel(BaseKernel):
self.suspend()
if amount > 0:
self.event("before_sleep", self.current_task, amount)
- self.current_task.next_deadline = self.current_task.paused_when + amount
+ self.current_task.next_deadline = self.clock.deadline(amount)
self.paused.put(self.current_task, amount)
else:
# If sleep is called with 0 as argument,
diff --git a/tests/files.py b/tests/files.py
index 171a605..f115b09 100644
--- a/tests/files.py
+++ b/tests/files.py
@@ -34,6 +34,7 @@ async def main_3(data: bytes):
assert not await path.exists()
await aprint(f"[main] Done in {structio.clock() - t:.2f} seconds")
+
MB = 1048576
payload = b"a" * MB * 100
# Write 100MiB of data (too much?)