Turn ByteQueue into MemoryStream wrapper, use MemoryStream for serialization of COutP...
[NovacoinLibrary.git] / Novacoin / NetInfo.cs
1 \feffusing System;
2
3 namespace Novacoin
4 {
5     internal class NetUtils
6     {
7         public static readonly uint nLockTimeThreshold = 500000000;
8         private static readonly uint nDrift = 7200;
9
10         public static uint GetAdjustedTime()
11         {
12             return Interop.GetTime();
13         }
14
15         public static uint FutureDrift(uint nTime)
16         {
17             return nTime + nDrift; // up to 2 hours from the future
18         }
19
20         public static uint PastDrift(uint nTime)
21         {
22             return nTime - nDrift; // up to 2 hours from the past
23         }
24     }
25 }