Skip to content

Commit d1a705d

Browse files
committed
added timeout explanation to readme
1 parent f034877 commit d1a705d

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ $ yarn add code-execution-engine
4646
const cee = require("code-execution-engine");
4747

4848
cee
49-
.execute("print('Hello World')", cee.languages.PYTHON3, [], "")
49+
.execute("print('Hello World')", cee.languages.PYTHON3, [], "", {
50+
timeout: 5,
51+
})
5052
.then((result) => {
5153
console.log(result);
5254
})
@@ -59,13 +61,17 @@ cee
5961

6062
Returns the result (stdout) of the executed code. If stderr is not empty, an exception will be thrown with the content of stderr.
6163

62-
_input_: string – The source code that should be executed.
64+
**_input_**: string – The source code that should be executed.
65+
66+
**_language_**: cee.Language – Pass the language the code is written in, for example `cee.languages.PYTHON3`. [Supported Lanuages](#supported-languages)
67+
68+
**_args_**: string[] - Command-Line arguments that are passed to the script
6369

64-
_language_: cee.Language – Pass the language the code is written in, for example `cee.languages.PYTHON3`. [Supported Lanuages](#supported-languages)
70+
**_stdin_**: string - Set the stdin for the script
6571

66-
_args_: string[] - Command-Line arguments that are passed to the script
72+
**_options_**: IExecuteOptions
6773

68-
_stdin_: string - Set the stdin for the script
74+
      _timeout_: number - Max execution time of the script. This option doesn't work on windows. Defaults to `5`
6975

7076
<a name="supported-languages"/>
7177

0 commit comments

Comments
 (0)