Added freezing time method

This is an approach  for freezing time. Some tests included. Also  resolves #27 .