From ce95aac19c8e243e9e4d085b88072fa577eff9c6 Mon Sep 17 00:00:00 2001 From: Danilo Date: Wed, 29 May 2024 10:41:24 -0300 Subject: [PATCH] =?UTF-8?q?Coment=C3=A1rios=20em=20TimeSpan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/csharp/timespan.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/inc/csharp/timespan.hpp b/inc/csharp/timespan.hpp index cbd46a5..abbd706 100644 --- a/inc/csharp/timespan.hpp +++ b/inc/csharp/timespan.hpp @@ -1,8 +1,3 @@ -/* - TimeSpan in C++ - Source code: https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs,865ef7b89f41b632 -*/ - #ifndef XNA_CSHARP_TIMESPAN_HPP #define XNA_CSHARP_TIMESPAN_HPP @@ -11,6 +6,8 @@ #include namespace xna { + //A port of the System.TimeSpan + //TimeSpan represents a duration of time.A TimeSpan can be negative or positive. struct TimeSpan { static constexpr int64_t NanosecondsPerTick = 100; static constexpr int64_t TicksPerMicrosecond = 10; @@ -49,7 +46,7 @@ namespace xna { static constexpr int64_t MinDays = MinTicks / TicksPerDay; static constexpr int64_t MaxDays = MaxTicks / TicksPerDay; static constexpr int64_t TicksPerTenthSecond = TicksPerMillisecond * 100; - + static constexpr TimeSpan Zero() { return TimeSpan(); } static constexpr TimeSpan MaxValue() { return TimeSpan(MaxTicks); } static constexpr TimeSpan MinValue() { return TimeSpan(MinTicks); }