diff options
Diffstat (limited to 'Timeline/Services/Clock.cs')
-rw-r--r-- | Timeline/Services/Clock.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Timeline/Services/Clock.cs b/Timeline/Services/Clock.cs new file mode 100644 index 00000000..98451ad9 --- /dev/null +++ b/Timeline/Services/Clock.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Timeline.Services +{ + /// <summary> + /// Convenient for unit test. + /// </summary> + public interface IClock + { + /// <summary> + /// Get current time. + /// </summary> + /// <returns>Current time.</returns> + DateTime GetCurrentTime(); + } + + public class Clock : IClock + { + public Clock() + { + + } + + public DateTime GetCurrentTime() + { + return DateTime.Now; + } + } +} |