From cc6280af7eca660c916dc652066216acd474979d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 23 Jan 2019 21:47:38 +0300 Subject: Add testscript sleep builtin --- build2/scheduler.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'build2/scheduler.hxx') diff --git a/build2/scheduler.hxx b/build2/scheduler.hxx index 388fa61..cd3693b 100644 --- a/build2/scheduler.hxx +++ b/build2/scheduler.hxx @@ -140,6 +140,13 @@ namespace build2 void activate (bool collision = false); + // Sleep for the specified duration, deactivating the thread before going + // to sleep and re-activating it after waking up (which means this + // function may sleep potentially significantly longer than requested). + // + void + sleep (const duration&); + // Startup and shutdown. // public: -- cgit v1.1