TimeSpan changes

Made code use TimeSpan instead of double. Updated examples.