Enyim.Caching.Memcached.ServerStats.GetUptime C# (CSharp) Method

GetUptime() public method

Returns the uptime of the specific server.
public GetUptime ( IPEndPoint server ) : System.TimeSpan
server System.Net.IPEndPoint The adress of the server
return System.TimeSpan
		public TimeSpan GetUptime(IPEndPoint server)
		{
			string uptime = GetRaw(server, StatItem.Uptime);
			if (String.IsNullOrEmpty(uptime))
				throw new ArgumentException("No uptime found for the server " + server);

			long value;
			if (!Int64.TryParse(uptime, out value))
				throw new ArgumentException("Invalid uptime string was returned: " + uptime);

			return TimeSpan.FromSeconds(value);
		}