We address a generalization of the classical discrete time-cost tradeoff problem where the costs are irregular and depend on the starting and the completion times of the activities. We present a complete picture of the computational complexity and the approximability of this problem for several natural classes of precedence constraints. We prove that the problem is np-hard and hard to approximate, even in case the precedence constraints form an interval order. For orders of bounded height, there is a complexity jump: for height one, the problem is polynomially solvable, whereas for height two, it is np-hard and apx-hard. Finally, the problem is shown to be polynomially solvable for orders of bounded width and for series parallel orders.