Add prettytime() and use it in demo code