What is the best way in c# to get the same result of javascript date.gettime() call?
The getTime() method returns the number of milliseconds since midnigh
You can use this solution:
private int GetTime() { var time = (DateTime.Now.ToUniversalTime() - new DateTime(1970, 1, 1)); return (int)(time.TotalMilliseconds + 0.5); }