Use cumsumfor cumulative amounts defining the times N_t as well as X_t. This illustrative code indicates the number of times to simulate n,, simulates the time in n.tand the values in x, and (to show what it did) determines the path.
n <- 1e2
n.t <- cumsum(rexp(n))
x <- c(0,cumsum(rnorm(n)))
plot(stepfun(n.t, x), xlab="t", ylab="X")

This algorithm, since it relies on low-level optimized functions, works quickly: the six-year-old system I tested on will generate more than three million (time, value) pairs per second.
, , T. , . , T. . , () , T .
.
T <- 1e2
T.max <- 0
n.t <- numeric(0)
while (T.max < T) {
T.remaining <- T - T.max
n <- ceiling(T.remaining + 3*sqrt(T.remaining))
n.new <- rexp(n)
n.t <- c(n.t, n.new)
T.max <- T.max + sum(n.new)
}
n.t <- cumsum(n.t)
n.t <- n.t[n.t <= T]
x <- c(0,cumsum(rnorm(length(n.t))))
plot(stepfun(n.t, x), xlab="t", ylab="X", sub=paste("n =", length(n.t)))