summaryrefslogtreecommitdiffstats
path: root/build2/scheduler.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-23 21:47:38 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-24 14:03:08 +0300
commitcc6280af7eca660c916dc652066216acd474979d (patch)
tree656eea184002c665ebb1c7385d1c560c2ea67249 /build2/scheduler.hxx
parent1a30ba3788022d9cbee8cd13ae065f927817a08b (diff)
downloadbuild2-cc6280af7eca660c916dc652066216acd474979d.tar.gz
build2-cc6280af7eca660c916dc652066216acd474979d.tar.xz
build2-cc6280af7eca660c916dc652066216acd474979d.zip
Add testscript sleep builtin
Diffstat (limited to 'build2/scheduler.hxx')
-rw-r--r--build2/scheduler.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/build2/scheduler.hxx b/build2/scheduler.hxx
index 388fa61a..cd3693be 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: