It should be enough time considering it usually takes just a couple of minutes to clear US immigration (they're as quick if not quicker than Sydney immigration from my experience). The key here is not to make the mistake many foreigners make which is to use the foreign citizen line. Instead, you want to download and install the Mobile Passport Control app on your phone (further details
can be found here). With the app you answer a couple of questions and then when you arrive in Miami, follow signs for Mobile Passport Control. Instead of waiting potentially minutes or even hours to clear immigration you'll be sorted in a matter of minutes.