For a flight time of, say, 18:30 hours, you'll have another hour before, and 30 minutes after. So, the actual tour of duty would be 20 hours. Everybody is 'on' for the hour before, and the first hour of the flight. Then all on again for the last hour, plus that 30 minutes.
So...the total duty time is (20*2) + (3:30*2) = 47 hours.
Looking at it another way. 18:30 flight time - 2 hours (all on time) = 16:30. Divide that by two, and you get the potential bunk time per seat. So, 8:15 off duty, and 11:45 on.
It all depends upon the design of the crew rest, and whether crew actually get any sleep in it or not. A quote from a management person (some years ago, and referring to another aircraft), when there were complaints about that aircraft's crew rest...."CASA says we have to give you a crew rest. Nothing says you have to be able to sleep in it". I thought he was pretty harsh at the time, but he's probably a coughcat compared to the new breeds of management.