RealWorldTerrainTimer.cs 531 B

12345678910111213141516171819202122232425
  1. /* INFINITY CODE 2013-2019 */
  2. /* http://www.infinity-code.com */
  3. using System;
  4. namespace InfinityCode.RealWorldTerrain
  5. {
  6. public struct RealWorldTerrainTimer
  7. {
  8. private long start;
  9. public double seconds
  10. {
  11. get { return (DateTime.Now.Ticks - start) / 10000000d; }
  12. }
  13. public static RealWorldTerrainTimer Start()
  14. {
  15. return new RealWorldTerrainTimer
  16. {
  17. start = DateTime.Now.Ticks
  18. };
  19. }
  20. }
  21. }