In particular, the ice time for different combinations of forwards and defencemen is obtained by processing the NHL's shift charts. The columns in these charts correspond to 7.5 seconds for overtime games or 6.67 seconds for non-overtime games, so this is as precise as my numbers can get. If a player leaves the ice or gets on the ice in the middle of one of those segments, then they will be recorded as playing either for the entire segment or for none of it. Things should even out more or less in the long run.
The determination of whether the Canadiens were playing on the power play, short-handed or at even strength during any time slice was made by comparing the number of players on the ice for the Habs and for the opposition at that time. However, since there are sometimes flaws in how many players are shown on the ice in a given column on the shift charts, there is no guarantee that my power play and short-handed times are perfectly accurate.
When calculating the percentage of time that each player spent with certain linemates, I use the ice time calculated by my program and not the actual ice time recorded for the players. The table below shows how close my numbers are to the actual numbers for a typical game.
Also, I know of a problem with my program that causes players spending time in the penalty box to get credited for a bit more ice time than they actually played. I likely won't get around to fixing this for a while.