aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/Util.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-20 16:10:35 +0000
committerAdam Frisby2007-05-20 16:10:35 +0000
commit7073286008016be98e2550219adc9d34af9dbc9f (patch)
treea7f2ba9e7fb37bea9049da0293c8a7026d9b6aa6 /OpenSim.Framework/Util.cs
parentDidn't want to get left behind in the number of commits, and hey it says ther... (diff)
downloadopensim-SC_OLD-7073286008016be98e2550219adc9d34af9dbc9f.zip
opensim-SC_OLD-7073286008016be98e2550219adc9d34af9dbc9f.tar.gz
opensim-SC_OLD-7073286008016be98e2550219adc9d34af9dbc9f.tar.bz2
opensim-SC_OLD-7073286008016be98e2550219adc9d34af9dbc9f.tar.xz
* Added UnixTimeSinceEpoch() function to Util class (god knows how many times we have reimplemented this.)
Diffstat (limited to '')
-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);