Description Usage Arguments See Also Examples
Set the timeout value for network operations on a mongo connection. Subsequent network operations will timeout if they take longer than the given number of milliseconds.
1 | mongo.set.timeout(mongo, timeout)
|
mongo |
(mongo) a mongo connection object. |
timeout |
(as.integer) number of milliseconds to which to set the timeout value. |
mongo.get.timeout
,
mongo.create
,
mongo.
1 2 3 4 5 6 7 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
mongo.set.timeout(mongo, 2000L)
timeout <- mongo.get.timeout(mongo)
if (timeout != 2000L)
error("expected timeout of 2000");
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.