O ne key factor contributing to emergency department (ED) overcrowding is prolonged waiting time for admission to inpatient wards, also known as ED boarding time. To gain insights into reducing this waiting time, we study operations in the inpatient wards and their interface with the ED. We focus on understanding the effect of inpatient discharge policies and other operational policies on the time-of-day waiting time performance, such as the fraction of patients waiting longer than six hours in the ED before being admitted. Based on an empirical study at a Singaporean hospital, we propose a novel stochastic processing network with the following characteristics to model inpatient operations: (1) A patient's service time in the inpatient wards depends on that patient's admission and discharge times and length of stay. The service times capture a two-time-scale phenomenon and are not independent and identically distributed.(2) Pre-and post-allocation delays model the extra amount of waiting caused by secondary bottlenecks other than bed unavailability, such as nurse shortage.(3) Patients waiting for a bed can overflow to a nonprimary ward when the waiting time reaches a threshold, where the threshold is time dependent. We show, via simulation studies, that our model is able to capture the inpatient flow dynamics at hourly resolution and can evaluate the impact of operational policies on both the daily and time-of-day waiting time performance. In particular, our model predicts that implementing a hypothetical policy can eliminate excessive waiting for those patients who request beds in mornings. This policy incorporates the following components: a discharge distribution with the first discharge peak between 8 a.m. and 9 a.m. and 26% of patients discharging before noon, and constant-mean allocation delays throughout the day. The insights gained from our model can help hospital managers to choose among different policies to implement depending on the choice of objective, such as to reduce the peak waiting in the morning or to reduce daily waiting time statistics.