Each session lasts for 3 hours. There are 3 villager crafting sessions per day. Some special events override this though. I think the second you walk in on them crafting, the session timer starts, but I'm not sure if this is true or not as I haven't timed it myself.
Not sure about how long they can actually craft for, I saw a screenshot from a GameFAQ thing that they craft for at least 3 hours. But as someone that's opened their island for crafting villagers before, sometimes someone arriving stops them from crafting X_X
I'd say about three hours. I assume if you close your game and reopen, it can stop them. Apparently if someone comes to your town to get a diy from them and pushed the minus button instead of leaving via airport, it can also make them stop early. I have been able to tt back a few hours to them doing the craft again, but it doesn't always work.