This will work: import core.thread; void main() { Thread.sleep(5.seconds); } sleep is a member of Thread, but it is static so you can easily call it to sleep the current thread. The argument is a Duration, which is most easily constructed with the .seconds, .msecs, .minutes, etc. helper functions like I did here.