throttle function
Throttle polling. @param throttleInMsec Amount in millisecond to wait between each polling.
Implementation
PollStrategy throttle(int throttleInMsec) {
return (Principal canisterId, RequestId requestId, String status) async {
var c = Completer();
Future.delayed(Duration(milliseconds: throttleInMsec), c.complete);
return c.future;
};
}