sleepMS method
Sleep method with time and optional infoB boolean for info-printing.
the parameter infoB can't cant have a value 'null' because of its tye,
but implicit default value = null
try adding explicit non-null default value or the 'required' modifier
OK Done
void sleepMS(int waitingTime, bool infoB
) {
callers: No usages found
:BUG: dart doc warning: unresolved doc reference bool infoB
Implementation
void sleepMS(int waitingTime, [bool infoB = false]) {
// var testSleepTime = new Duration(hours:0, minutes:0, seconds:0, microseconds:500);
var goalTime = DateTime.now().add(new Duration(milliseconds: waitingTime));
/// Mjust explicitly set
bool _infoB = false;
_infoB = infoB;
if (_infoB) (print('Waiting for $waitingTime'));
do {
// var timeNow = new DateTime.now();
} while (new DateTime.now().compareTo(goalTime) < 0);
if (_infoB) (print('waiting time over over'));
}