Executes the given runnable with the given delay. Either sync or async (specified by the sync parameter).