consolidate mdelay by providing a common function for all users