diff --git a/doc/19-library-reference.md b/doc/19-library-reference.md index 087a3c26c..2ac091499 100644 --- a/doc/19-library-reference.md +++ b/doc/19-library-reference.md @@ -26,6 +26,7 @@ escape\_shell\_arg(text) | Escapes a string for use as a single shell arg escape\_shell\_cmd(text) | Escapes shell meta characters in a string. escape\_create\_process\_arg(text)| (Windows only) Escapes a string for use as an argument for CreateProcess(). exit(integer) | Terminates the application. +sleep(interval) | Sleeps for the specified amount of time (in seconds). ## Object Accessor Functions diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index d27f6e59a..5d99c3dc4 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -66,6 +66,7 @@ REGISTER_SAFE_SCRIPTFUNCTION_NS(System, escape_shell_arg, &Utility::EscapeShellA REGISTER_SAFE_SCRIPTFUNCTION_NS(System, escape_create_process_arg, &Utility::EscapeCreateProcessArg); #endif /* _WIN32 */ REGISTER_SCRIPTFUNCTION_NS(System, ptr, &ScriptUtils::Ptr); +REGISTER_SCRIPTFUNCTION_NS(System, sleep, &Utility::Sleep); String ScriptUtils::CastString(const Value& value) {