Skip to content

Commit e600b29

Browse files
committed
* Minor feature for Epoch UTC timing in utility
1 parent 3f3623e commit e600b29

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Scripts/Utilities/Utility.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,15 @@ public static string StripString(string s)
274274

275275
}
276276

277+
/// <summary>
278+
/// Gets the EPOCH time in UTC time zome
279+
/// </summary>
280+
/// <returns>Double EPOCH in UTC</returns>
281+
public static double GetEpochUTC()
282+
{
283+
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
284+
return (DateTime.UtcNow - epoch).TotalMilliseconds;
285+
}
277286

278287

279288
/// <summary>

0 commit comments

Comments
 (0)