A note on spacelike and timelike compactness