aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.Framework/Util.cs')
-rw-r--r--OpenSim.Framework/Util.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim.Framework/Util.cs b/OpenSim.Framework/Util.cs
index 5bf7ff9..6f60925 100644
--- a/OpenSim.Framework/Util.cs
+++ b/OpenSim.Framework/Util.cs
@@ -36,6 +36,13 @@ namespace OpenSim.Framework.Utilities
36 return id; 36 return id;
37 } 37 }
38 38
39 public static int UnixTimeSinceEpoch()
40 {
41 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
42 int timestamp = (int)t.TotalSeconds;
43 return timestamp;
44 }
45
39 //public static int fast_distance2d(int x, int y) 46 //public static int fast_distance2d(int x, int y)
40 //{ 47 //{
41 // x = System.Math.Abs(x); 48 // x = System.Math.Abs(x);