With the emergence of massive compute-intensive and delay-sensitive applications, and driven by big data and low delay computation requirements, mobile edge computing (MEC) will play an important role in improving user experience and reducing energy consumption. However, MEC servers have limited computation resources and cannot respond quickly to the large amounts of bursting computation requirements, so computation waiting time at MEC servers is unavoidable and unpredictable. To meet the computation delay requirements of the applications in an uncertain computation waiting time network, this paper formulates a system energy consumption minimization problem with computation delay constraints and proposes a stochastic simulation based two-stage stochastic programming (SS_2SSP) algorithm for task offloading and resource allocation. The simulation results show that the SS_2SSP algorithm can meet the computation delay requirements of the applications while effectively reducing the system energy consumption.