A Theory of Allocation of Time in Markets for Labour and Marriage