apoc.util.sleep

Details

Syntax

apoc.util.sleep(duration)

Description

Causes the currently running Cypher to sleep for the given duration of milliseconds (the transaction termination is honored).

Input arguments

Name

Type

Description

duration

INTEGER

The milliseconds to sleep.

Usage Examples

WITH apoc.date.currentTimestamp() AS start
CALL apoc.util.sleep(1000)
WITH start, apoc.date.currentTimestamp() AS end
RETURN datetime({epochmillis: start}) AS start,
       datetime({epochmillis: end}) AS end;
Results
start end

2021-01-19T12:19:11.978Z

2021-01-19T12:19:12.978Z