LEFT | RIGHT |
1 /* | 1 /* |
2 Copyright 2013 Google Inc | 2 Copyright 2013 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
(...skipping 16 matching lines...) Expand all Loading... |
27 /// </summary> | 27 /// </summary> |
28 DateTime Now { get; } | 28 DateTime Now { get; } |
29 } | 29 } |
30 | 30 |
31 /// <summary>A default clock implementation that wraps the <seealso cref="Da
teTime.Now"/> property.</summary> | 31 /// <summary>A default clock implementation that wraps the <seealso cref="Da
teTime.Now"/> property.</summary> |
32 public class SystemClock : IClock | 32 public class SystemClock : IClock |
33 { | 33 { |
34 /// <summary>Constructs a new system clock.</summary> | 34 /// <summary>Constructs a new system clock.</summary> |
35 protected SystemClock() { } | 35 protected SystemClock() { } |
36 | 36 |
37 /// <summary>The default instance</summary> | 37 /// <summary>The default instance.</summary> |
38 public static readonly IClock Default = new SystemClock(); | 38 public static readonly IClock Default = new SystemClock(); |
39 | 39 |
40 public DateTime Now | 40 public DateTime Now |
41 { | 41 { |
42 get { return DateTime.Now; } | 42 get { return DateTime.Now; } |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
LEFT | RIGHT |