Two approaches for timing in digital audio workstations (DAWs), at least as I have implemented them myself, are "MIDI-Time-Interval-per-Sample" and "Sample-Interval-per-MIDI-Time". 
The first "MIDI-Time-Interval-per-Sample" approach uses a 32.32bit fixed-point (with 64.64bit precalculations of some constants) value to represent the interval of MIDI time units per sample. It tracks the accumulated MIDI time by adding this interval to an accumulator for each sample processed. When the accumulator reaches a certain threshold, a MIDI event is processed and the accumulator is updated. With this approach it is also possible to determine a fractitional portion of the MIDI time unit, which can then be used for even more precise automation interpolation, for example.
The second "Sample-Interval-per-MIDI-Time" approach uses also a 32.32bit fixed-point … (read more)