I am writing a node function whose executions should be not too close in time (say 5 seconds).
I need to enforce the minimum delay inside the function, and not on the calling side, since its user should know nothing about the delay.
This is the reason why I can't use logic similar to delay or delayed node modules...
Note that I cannot simply setTimeout()
wrap the function code either, since I want to enforce a minimum delay among executions (i.e.: the first execution should start immediately).
via MarcoS
No comments:
Post a Comment