optimisation: use built-in time vars \t and %*