Helper functions for timing analysis added.