Skip to content
timojaask edited this page Jun 29, 2014 · 3 revisions

get_servertime

Get the current server time. Can be useful for time synchronization.

  • URL: http://whispr.outi.me/api/get_servertime
  • Method: Get
  • Arguments: None
  • Return value: Returns Unix timestamp for the current server time

Examples

##C#

var client = new HttpClient();
// Create the request URL
var uri = new Uri("http://whispr.outi.me/api/get_servertime");
// Send request and get a result string
var unixTimeStampStr = await client.GetStringAsync(uri);
// Parse the result string into a Unix time stamp (use try/catch)
var serverTimeStamp = long.Parse(unixTimeStampStr);
Clone this wiki locally