I work out the overall pace I need to achieve my target time, I then look at the hills and add a bit on in those sections... I then take that time off the flat/ downhill sections to give me the time I need for those bits....
Not very scientific but it seems to work for me... In my last HM I needed an average of 10:18 to get below the 2:15 time.... So, on the flatter sections I tried to keep as close to 9:30 as I could so I knew I had a few minutes in the "bank" to cover the uphill sections !