You could do this by using a turnscript. You need a global variable "oldplace" to save the actual room of the player. Within the turnscript you compare oldplace with player.parent. If they are different, the player has changed the room.
To have different times, you can use a dictionary.
Here is an example what I mean:
room1 with exit to room2 takes 10 minutes
room1 with exit to room3 takes 23 minutes
<times type="stringdictionary">
room1_room2=10
room1_room3=23
</times>
With oldplace and player_parent you can create the key of an entry of the dictionary