The distribution of visual attention can influence the temporal perception of visual events. If two stimuli are shown in close temporal succession, the second one can be perceived as appearing first, if attention is directed toward it. This phenomenon is known as "prior entry" and has a long history in perception research. However, important fundamental mechanisms that drive the phenomenon were unknown until recently. For instance, how the acceleration of attended and deceleration of unattended stimuli in their processing combine to prior entry was unknown. The cause for this and similar shortcomings are limitations in the methods typically applied in temporal-order judgment (TOJ) research. Importantly, the methods lack strong theories that describe the fundamental encoding processes in TOJs. In this work, a strong theory of attention-biased encoding, TVA (Theory of Visual Attention) is used to model TOJs. In several experiments, the fundamental open questions regarding the perception of temporal order were answered using TVA-based models. For example, the results show that prior entry arises from equipotent speedups and slowdowns of attended and unattended stimuli, respectively. However, the slowdown component is of greater importance for the bias manifested in the prior-entry effect. Another result of this thesis is the quantitative description of the strong effect of peripheral cues in TOJs, which is in part caused by cue-target confusions on the encoding level.