SelectWindows Phone 8 Misc API Reference for Realtime Apps

These docs are for version 3.8.7 of the Windows Phone 8 SDK. To check out the docs for the latest version Click Here.

PubNub 4.0 for C# is our latest and greatest! Please click here for our PubNub 4.0 for C# docs and SDK.

PubNub 3.x for C# will encounter End Of Life (EOL) Aug 1st, 2018. All users currently on 3.x should begin migrating to 4.x. The 3.x SDK will continue to work. We will no longer support it and if you run into an issue, we will request that you upgrade to the latest version before solving the issue.

If you have questions about the PubNub for C# SDK, please contact us at

This function will return a 17 digit precision Unix epoch.
The timetoken is constructed using the following algorithm:
timetoken = (Unix epoch time in seconds) * 10000000
Example of creating a timetoken for a specific time and date
08/19/2013 @ 9:20pm in UTC = 1376961606
timetoken = 1376961606 * 10000000
timetoken = 13769616060000000
To fetch Time you can use the following method(s) in Windows Phone 8 SDK
  1. ParameterTypeRequiredDescription
    userCallbackCallback Method of Type objectYesThis callback is called on receiving a message from the channel.
    errorCallbackCallback Method of Type PubnubClientError YesThis callback is called on an error event.
void DisplayReturnMessage(string result)
    Console.WriteLine("TIME CALLBACK");
void DisplayErrorMessage(PubnubClientError pubnubError)
The Time function returns a string timetoken in the following format:

EndPendingRequests frees up the threads and allows for clean exit.
  1. EndPendingRequests()
pubnub = null;