Implement the System#sleep function

fixes #12411
This commit is contained in:
Gunnar Beutner 2016-08-12 15:21:28 +02:00
parent 491acb62ea
commit 12ea2a6445
2 changed files with 2 additions and 0 deletions

View File

@ -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).
## <a id="object-accessor-functions"></a> Object Accessor Functions

View File

@ -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)
{