diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-23 21:47:38 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-24 14:03:08 +0300 |
commit | cc6280af7eca660c916dc652066216acd474979d (patch) | |
tree | 656eea184002c665ebb1c7385d1c560c2ea67249 /build2/scheduler.hxx | |
parent | 1a30ba3788022d9cbee8cd13ae065f927817a08b (diff) |
Add testscript sleep builtin
Diffstat (limited to 'build2/scheduler.hxx')
-rw-r--r-- | build2/scheduler.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
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: |