Might be more efficient to get the timestamp once rather than for every call to cast. Very minor though.