forked from Giannoudis/TimePeriodLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StaticClock.cs
37 lines (30 loc) · 1.06 KB
/
StaticClock.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// -- FILE ------------------------------------------------------------------
// name : StaticClock.cs
// project : Itenso Time Period
// created : Jani Giannoudis - 2011.02.18
// language : C# 4.0
// environment: .NET 2.0
// copyright : (c) 2011-2012 by Itenso GmbH, Switzerland
// --------------------------------------------------------------------------
using System;
namespace Itenso.TimePeriod
{
// ------------------------------------------------------------------------
public class StaticClock : IClock
{
// ----------------------------------------------------------------------
public StaticClock( DateTime now )
{
this.now = now;
} // StaticClock
// ----------------------------------------------------------------------
public DateTime Now
{
get { return now; }
} // Now
// ----------------------------------------------------------------------
// members
private readonly DateTime now;
} // class StaticClock
} // namespace Itenso.TimePeriod
// -- EOF -------------------------------------------------------------------