diff options
Diffstat (limited to 'cs/src/Ice/Time.cs')
-rw-r--r-- | cs/src/Ice/Time.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cs/src/Ice/Time.cs b/cs/src/Ice/Time.cs index a853a9df5f0..21195543ca6 100644 --- a/cs/src/Ice/Time.cs +++ b/cs/src/Ice/Time.cs @@ -9,6 +9,7 @@ namespace IceInternal { +#if !SILVERLIGHT using System.Diagnostics; public sealed class Time @@ -25,4 +26,20 @@ namespace IceInternal private static Stopwatch _stopwatch = new Stopwatch(); } +#else + public sealed class Time + { + static Time() + { + _begin = System.DateTime.Now.Ticks; + } + + public static long currentMonotonicTimeMillis() + { + return (System.DateTime.Now.Ticks - _begin) / 10000; + } + + private static long _begin; + } +#endif } |