Changed to get timestamps after clear and before flip
Wrapped timestamp functions